fetch an asset (a picture for instance) from a remote server and upload it to S3 (and remove the local copy). Or upload a local file on S3
Fetches an asset (picture for instance) from a remote URL and uploads it to Amazon S3
npm install fetch-upload-s3
create an aws_config.json file with the following fields. You can put whatever region you like.
var FUS3 = require'fetch-upload-s3';var fus3 = 'my_aws_bucket';// For fetch url :fus3initfus3do'' 'my_key'console.log'file uploaded to S3!';console.logdata;;;// for upload File :fus3initfus3uploadFileabsoluteFilePath 'my_key'console.log'file uploaded to S3!';console.logdata;;;
A temp folder './.tmp/fetch_upload_s3' is used as a proxy. Files are deleted locally as soon as they have been uploaded to S3