property plugin for thumos, allows storage and manipulation of files in thumos. storage mechanism is currently s3
- prior to encoding, a file object (from a file picker, dropevent etc) is expected.
- once encoded the property has the api:
name
name of original file uploadedsize
size (bytes) of fileurl
url to download file with get requestvalue
the output ofonupload
(if any)
- if the
store
option is false the value of the property will simply be the output ofonupload
global options are passed as the file
property in thumos' config object required options are:
bucket
name of s3 bucket to useregion
name of s3 region to usetmpdir
path to local directory to store temporary filestimeout
removal delay for temporary files (seconds). defaults to 60.route
path for express route for file upload service. defaults to/bin
thumos-file looks for the following options in the property config object. none are required
onupload : function(localPath, callback)
store
bool (default true) if false: file will not be stored, only the value returned fromonupload
will be storeddownload
bool (default false) if true: requests will include headers for download, along with filename