@wj77998/oss-upload
v1.1.5
Published
阿里云oss上传工具
Downloads
2
Readme
介绍
阿里云上传文件、文件夹cli命令
安装
npm i @wj77998/oss-upload -g
使用
oss-upload publish -d ./build -c ./config-example.json
# 全局配置 (优先级最高)
oss-upload publish -d ./build -c /User/xxx/oss-upload.json
# 命令行配置
oss-upload publish -d ./build -r <region> -k <accessKeyId> -s <accessKeySecret> -b <bucket>
oss-upload p -d ./build -r <region> -k <accessKeyId> -s <accessKeySecret> -b <bucket>
# 全局设置
oss-upload set -r <region> -k <accessKeyId> -s <accessKeySecret> -b <bucket>
oss-upload s -r <region> -k <accessKeyId> -s <accessKeySecret> -b <bucket>
配置文件
{
"accessKeyId": "",
"accessKeySecret": "",
"region": "",
"bucket": ""
}
自定义全局命令
alias upload="oss-upload publish -c ~/oss-config.json -d"
$ upload ./dist
$ upload ./a.zip