sunland-upload-sdk
v2.0.1
Published
sync file to sunland file system
Downloads
61
Maintainers
Readme
尚德上传文件夹到文件服务系统(批量上传)
安装
npm install --save sunland-upload-sdk
配置项
在项目根目录新建如下xxx.json
{
"SDUrl": "https://sfs-api.shangdejigou.cn/api/auth/",
"remotePath": "https://sfs-public.shangdejigou.cn/sunlands_back_freestudy",
"accessKey": "xxx",
"secretKey": "xxx",
"prefix" : "/fe/ananas",
"localPath" : "ananas"
}
SDUrl
获取文件系统接口地址remotePath
文件系统配置的cdn地址accessKey
accessKeysecretKey
secretKeyprefix
拼接到cdn网址后(一般为项目名称)localPath
本地需要上传的路径
执行上传
-package.json
{
"script": {
"upload": "upload xxx.json"
}
}
- tips
upload
为暴露的cli
命令