- Source:
Properties:
| Name | Type | Description |
|---|---|---|
searchLoactions |
Array | This paths which can be searched for this file. Comprised of paths from api.config.general.paths and plugins. |
Countains helpers for returning flies to connections.
Extends
Methods
(async, static) get(connection, counter) → {Promise.<Object>}
- Source:
For a connection with connecton.params.file set, return a file if we can find it, or a not-found message.
searchLoactions will be cheked in the following order: first paths in this project, then plugins.
This can be used in Actions to return files to clients. If done, set data.toRender = false within the action.
Parameters:
| Name | Type | Description |
|---|---|---|
connection |
Object | An ActionHero.Connection |
counter |
Nmbber | (do not set) An internal couner to track which path we should check on (recursive) |
Returns:
Returns a collection of metadata and a FileStream: {connection, fileStream, mime, length, lastModified}
- Type
- Promise.<Object>