file-cloud-alioss-uploader

0.0.3 • Public • Published

NPM version Build Status Dependency Status

Aliyun oss uploader

Install

$ npm install --save file-cloud-alioss-uploader

Usage

var fileCloudAliossUploader = require('file-cloud-alioss-uploader');
 
    var config = {
      accessKeyId: process.env.ALIYUN_OSS_ACCESS_KEY_ID,
      secretAccessKey: process.env.ALIYUN_OSS_ACCESS_KEY_SECRET,
      endpoint: process.env.ALIYUN_OSS_ENDPOINT,
      apiVersion: process.env.ALIYUN_OSS_APP_VERSION,
      Bucket: process.env.ALIYUN_OSS_BUCKET
    };
    fileCloudAliossUploader(function (error, data) {
      //error: false
      //data.ETag
      //data.RequestId
    }, path.resolve(__dirname, 'assets/a.jpg'), config);
$ npm install --global foss
$ foss --help
 
$ foss  a.txt aliyun.json
 
$ foss a.jpg aliyun.json --type md5
 
$ foss a.jpg aliyun.json --type md5 --case upper
 

License

MIT © calidion

Package Sidebar

Install

npm i file-cloud-alioss-uploader

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • calidion