aws file uploader for file cloud
Install
$ npm install --save file-cloud-aws-uploader
Usage
var fileCloudAwsUploader = ; var called = false;var config = accessKeyId: processenvAWS_S3_ACCESS_KEY_ID secretAccessKey: processenvAWS_S3_ACCESS_KEY_SECRET endpoint: processenvAWS_S3_ENDPOINT Bucket: processenvAWS_S3_BUCKET region: 'ap-northeast-1' { called = true; };;
$ npm install --global file-cloud-aws-uploader $ faws3 --help $ faws3 a.txt aws.json $ faws3 a.jpg aws.json --type md5 $ faws3 a.jpg aws.json --type md5 --
aws.json Format
General Configure
//aws.json formate "accessKeyId": "YOUR_ID" "secretAccessKey": "YOUR_SECRET" "endpoint": "s3-cn-northeast-1.amazonaws.com.cn" "Bucket": "subdomain.xxx.com" "region": "ap-northeast-1"
Beijing China
Must additionally add:
"endpoint": "s3.cn-north-1.amazonaws.com.cn" "region": "cn-north-1"
That is:
"accessKeyId": "YOUR_ID" "secretAccessKey": "YOUR_SECRET" "endpoint": "s3.cn-north-1.amazonaws.com.cn" "Bucket": "subdomain.xxx.com" "endpoint": "s3.cn-north-1.amazonaws.com.cn" "region": "cn-north-1"
License
MIT © calidion