kumi-upload-oss

1.0.2 • Public • Published

upload-oss

将打包编译好的文件上传到阿里云oss,每次打包后自动上传文件

根据阿里云技术文档提供的上传API进行开发

How to use

npm install kumi-upload-oss -S
import uploadForOss from 'kumi-upload-oss';

### 以下参数加入到budil/build.js中
const uploadPath = '/usr/xxx/dist/';
const accessKeyId = '<accessKeyId>';
const accessKeySecret = '<accessKeySecret>';
const region = '<oss-cn-qingdao>';
const bucket = '<bucket name>';

### 在打包结束后执行此方法
uploadForOss.upload(uploadPath, accessKey, secretKey, zone, bucket);

Params

Param Description
accessKeyId 阿里云accessKeyId
accessKeySecret 阿里云accessKeySecret
uploadPath 文件的绝对路径
region 空间区域,参考链接
bucket 空间名称

Readme

Keywords

none

Package Sidebar

Install

npm i kumi-upload-oss

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

8.58 kB

Total Files

13

Last publish

Collaborators

  • kumiyunwii