oss-uploader
v2.0.0
Published
批量上传至阿里云OSS
Downloads
7
Maintainers
Readme
uploadForOSS
基于node.js开发
本地文件批量上传到阿里云OSS
# npm 安装
npm i oss-uploader -S
# 使用与配置
const uploadForOSS = require('oss-uploader')
const uploadPath = '' # 此处为要上传的文件的本地路径(文件夹或单个文件)
const prefixKey = 'assetsDir' # 静态文件目录名称,区分同一个bucket下的不同项目
uploadForOSS({
uploadPath,
ossData: {
region: '',
accessKeyId: '',
accessKeySecret: '',
bucket: ''
},
prefixKey
})