tos3
v1.1.0
Published
Download a file and upload to s3 with new url returned
Downloads
5
Readme
tos3
upload to s3 from external GET url
Install
$ npm install --save tos3
Usage
var tos3 = require('tos3');
var url = 'http://www.cats.org.uk/uploads/branches/211/5507692-cat-m.jpg';
var uploader = tos3(config);
uploader(url)
.then(function(url) {
// new url
});
API
config
Type: Object
AWS config properties
config.ACCESS_KEY required
Type: String
AWS S3 access key
config.SECRET_KEY required
Type: String
AWS S3 secret key
config.BUCKET required
Type: String
AWS S3 Bucket name
config.ACL required
Type: String
AWS S3 ACL
uploader(url, name, params)
url required
Type: String
Url to query from
name
Type: String
Default: uuid.v1()
New name for the file or default to auto generate from uuid
params
Type: Object
Default: {}
Extra params to pass along S3 upload
params
Related
License
MIT © Yu-Jin