upload-files-to-oss
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

upload-files-to-oss

npm version npm downloads

  • 上传指定文件夹内所有文件到oss

使用

type Option = {
  region: string,
  accessKeyId: string,
  accessKeySecret: string,
  bucket: string,
  limit?: number, // 异步任务数量 默认200
}
// esm

import uploadFileToOSS from 'upload-files-to-oss'
uploadFileToOSS(
  {
    region: 'xxx',
    accessKeyId: 'xxx',
    accessKeySecret: 'xxx',
    bucket: 'xxx'
  },
  // '文件夹路径'
  '../dist'
)
// ejs
const  uploadFileToOSS = require('upload-files-to-oss')
uploadFileToOSS(
  {
    region: 'xxx',
    accessKeyId: 'xxx',
    accessKeySecret: 'xxx',
    bucket: 'xxx'
  },
  // '文件夹路径'
  '../dist'
)

License

MIT License © 2022 Jeffrey-mu

Readme

Keywords

Package Sidebar

Install

npm i upload-files-to-oss

Weekly Downloads

13

Version

0.0.11

License

MIT

Unpacked Size

7.97 kB

Total Files

6

Last publish

Collaborators

  • mr-wang1009