bos-upload-dir
上传文件夹至bos。
使用
安装
npm install bos-upload-dir
配置
const path = ;const Uploader = ; const uploader = bos: credentials: ak: 'xxxxxxxx' sk: 'xxxxxxxx' endpoint: 'http://xx.xxx.com' bucketName: 'xxx' urlPrefix: '//xxx.bdstatic.com/' prefix: 'test';// 上传 lib 文件夹下的文件至 bosuploader;
Options
name | type | default | required | Description |
---|---|---|---|---|
bos | {Object} | true | bos相关配置,具体可参考百度云文档 | |
prefix | {String} | '' | false | 上传至 bos bucket 下的前缀路径 |