alioss-file

1.0.0 • Public • Published

aliyun OSS文件操作node工具包

环境要求

要求Node.js >= 8.0.0

安装包

npm install alioss-file --save

接口

初始化sdk

const OSS = require('alioss-file');
const store = new OSS({
  region: '<oss region>',
  accessKeyId: '<Your accessKeyId>',
  accessKeySecret: '<Your accessKeySecret>',
  bucket: '<Your bucket name>'
});

下载文件

await store.downloadFile('imgs/baojing.png') // 缺省本地路径
await store.downloadFile('imgs/baojing.png', './baojing.png') // 指定本地路径

下载文件夹

await store.downloadFolder('imgs') // 缺省本地路径
await store.downloadFolder('imgs', './img') // 指定本地路径

Readme

Keywords

Package Sidebar

Install

npm i alioss-file

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

3.5 kB

Total Files

3

Last publish

Collaborators

  • wanyi.css