1.0.2 • Published 2 years ago

@voyo/ali-oss v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Install

npm i @voyo/ali-oss

Usage

const {AliYoOSS} =require("@voyo/ali-oss");

const oss=new AliYoOSS({
  accessKeyId: "",
  accessKeySecret:"",
  region: "",
  bucket: ""
});
// upload file
oss.putFile("/remote/1.jpg","/native/1.jpg").then(result=>{});
// upload directory
oss.putDir("/remote/dir","/native/dir").then(result=>{});
// update httpHeaders of file.
oss.putHeader("/remote/file",{"cache-control":"max-age=20000"});

use original oss method. Reference.

oss.oss[method]