@blueshit/oss-client
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

oss-client

阿里云 OSS 客户端

Install

const OSSClient = require("@blueshit/oss-client").default;

const client = new OSSClient({
  accessKeyId: "xxxxx",
  accessKeySecret: "xxxxxxx",
  bucket: "test",
  endpoint: "oss-cn-shenzhen.aliyuncs.com",
  prefix: "test/"
});

// 通过 Buffer 上传
const data = fs.readFileSync("icon.png");
client.putObject("icon.png", data)
  .then(console.log)
  .catch(console.log);

// 通过 Stream 上传
const stream = fs.createReadStream("icon.png");
client.putObject("icon.png", stream)
  .then(console.log)
  .catch(console.log);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.13latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.13
1.3.00
1.2.00
1.1.00
1.0.01
0.10.00
0.9.00
0.8.00
0.7.00
0.6.01
0.5.00
0.4.01
0.3.01
0.2.00
0.1.00

Package Sidebar

Install

npm i @blueshit/oss-client

Weekly Downloads

5

Version

1.3.1

License

MIT

Unpacked Size

11.2 kB

Total Files

5

Last publish

Collaborators

  • leizongmin
  • yourtion