3.0.6 • Published 4 years ago
sht-upload v3.0.6
下载
npm install sht-upload -g
添加配置文件
需在项目的根目录下添加一个 .env 文件
# 腾讯云测试桶
TEST_BUCKET = <your tencent cloud test bucket>
# 腾讯云正式桶
FORMAL_BUCKET = <your tencent cloud bucket>
# 地域
REGION = <your tencent region>
# 腾讯云SECRET_ID
SECRET_ID = <your tencent secret id>
# 腾讯云SECRET_KEY
SECRET_KEY = <your tencent secret key>
# 腾讯云保存的图片文件夹名称
CLOUD_FILE_NAME = <your cloud file name>
# 腾讯云测试桶域名
TEST_DOMAIN = <your tencent test bucket domain>
# 腾讯云正式桶域名
DOMAIN = <your tencent cloud bucket domain>
使用
sht-upload upload <targetFileName> [-d | -p | -f]
参数说明
-d --develop 默认命令 上传到腾讯云测试桶
-p --production 上传到腾讯云正式桶
-f --fileName <name> 指定存放的子文件夹名称,主文件夹名称是:CLOUD_FILE_NAME,若不指定子文件夹名称,则没有。