2.2.0 • Published 3 years ago

qcloud-uploader-cli v2.2.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

qcloud-uploader-cli

upload your files to cloud, not just qlocud, but also aws s3.

Env config

const config = {
  s3: {
    bucket: process.env.S3_BUCKET
  },
  qcloud: {
    sid: process.env.QCLOUD_SID,
    skey: process.env.QCLOUD_SKEY,
    bucket: process.env.QCLOUD_BUCKET,
    region: process.env.QCLOUD_REGION || process.env.QCLOUD_REGIEON
  }
}

Just set IAM roles for your server, see IAM Roles

Usage

Upload a local directory to remote bucket

qcloud-uploader-cli -r ./build -n remoteDirName

Upload a local file to remote bucket

qcloud-uploader-cli -s android.apk -d androids/v3.3.3.apk

Demo

 ./cli.js -r test -n static/sub

Output

{
  "s3": {
    "bucket": "xxx"
  },
  "qcloud": {
    "sid": "xxx",
    "skey": "xxx",
    "bucket": "xxx",
    "region": "xxxx"
  }
}
Start uploading directory: /Users/simonxu/qcloud-uploader-cli/test
Uploading file: static/sub/1.txt
Uploading file: static/sub/2.text
Uploading file: static/sub/sub/sub.txt
**** upload cos success = static/sub/2.text ****
**** upload cos success = static/sub/1.txt ****
**** upload cos success = static/sub/sub/sub.txt ****
**** upload aws success = static/sub/1.txt ****
**** upload aws success = static/sub/2.text ****
**** upload aws success = static/sub/sub/sub.txt ****
Complete uploading file!
2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago