gn-s3-uploader
v0.0.2
Published
Simple module for uploading files in a given dir to AWS S3
Downloads
10
Maintainers
Readme
gn-s3-uploader
Simple script for uploading files in a dir to the AWS S3 storage. Useful when working with data migration.
Installation
$ npm install gn-s3-uploader
Usage
The script will append the generated keys to a success-<timestamp>.txt
file as the uploads are completed. In case of error, the filename is appended to an error-<timestamp>.txt
. Both files are created in the same directory in which the script was called.
Usage: index [options]
Options:
-h, --help output usage information
-V, --version output the version number
-d, --dir <path> full path of the folder with the files to upload
-b, --bucket <string> the S3 bucket
-k, --accessKeyId <string> the S3 accessKeyId
-s, --secretAccessKey <string> the S3 secretAccessKey
-acl, --acl <value> custom acl, defaults to public-read
-r, --region <value> custom region, defaults to sa-east-1
-keyPrefix, --keyPrefix <value> an optional prefix to concat with the generated key, ex. cdn/images/
TO DO
Unit test the gn-uploader class