alioss-auto-upload
v1.0.4
Published
阿里云oss自动上传工具
Downloads
10
Readme
阿里云oss自动上传工具
1.安装
npm i alioss-auto-upload
2.使用
const path = require('path');
const AutoUpload = require('autoupload');
(async () => {
const autoupload = new AutoUpload({
dir: path.join(__dirname, '../dist/'),
originDir: '/media-external/dist/',
accessKeyId: '',
accessKeySecret: '',
bucket: '',
internal: 'false', // access OSS with aliyun internal network or not, default is false. If your servers are running on aliyun too, you can set true to save lot of money.
region: '' // oss区域 默认 oss-cn-hangzhou
})
await autoupload.start()
})()