Extends
Members
(static) services
Defines the services required by this store.
- Source:
(private) _di_allow_defer :boolean
If true, the injector will defer the class if the class requests any services that the container is missing. These services are filled in later and added to the prototype and any instances. True by default.
- boolean
- Inherited From:
- Source:
(private) _di_deferred_instances :Array.<module:flitter-di/src/Injectable~Injectable>
Collection of instances of this class that need to have the deferred service instances injected into them when the deferred services are finally provided.
- Source:
(private) _di_deferred_services :Array.<string>
List of services that were deferred and not provided at the time of injection.
- Array.<string>
- Source:
config :object
The configuration for this store.
- object
- Inherited From:
- Source:
(private) s3
The S3 client.
- Source:
Methods
(async) download_file(file, destination) → {Promise.<void>}
Download the file locally to the given destination.
Name | Type | Description |
---|---|---|
file |
module:flitter-upload/model/File~File | |
destination |
- Source:
- Type
- Promise.<void>
(async) init() → {Promise.<void>}
Initializes the store.
- Overrides:
- Source:
- Type
- Promise.<void>
read_stream(file) → {ReadStream}
Create a Readable stream for this file.
Name | Type | Description |
---|---|---|
file |
module:flitter-upload/model/File~File |
- Source:
- Type
- ReadStream
(async) send_file(file, response) → {Promise.<void>}
Send the specified file as the data for the response. Sets the appropriate Content-Type and Content-Disposition headers.
Name | Type | Description |
---|---|---|
file |
module:flitter-upload/model/File~File | the file to send |
response |
express/response | the response |
- Source:
- Type
- Promise.<void>
(async) store(params) → {Promise.<module:flitter-upload/model/File~File>}
Permanently store a temporarily uploaded file in this store.
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object |
Properties
|
- Source:
- Type
- Promise.<module:flitter-upload/model/File~File>
(async) upload_file_as_key(file_path, key_path) → {Promise.<unknown>}
Upload the file path to the S3 key.
Name | Type | Description |
---|---|---|
file_path |
string | the local file path |
key_path |
string | the S3 key |
- Source:
- Type
- Promise.<unknown>
upload_key(upload_uuid, tagopt) → {string}
Given an upload UUID and some tag, returns the full S3 upload key of the file.
Name | Type | Attributes | Description |
---|---|---|---|
upload_uuid |
string | ||
tag |
string |
<optional> |
- Source:
- Type
- string