1.0.2 • Published 2 years ago

@code-easy/oss-common v1.0.2

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

oss-common

Install

npm install oss-common 

Start

// one of config
let client = new OssClient({
    MinIO: minioConfig,
});

let client = new OssClient({
    COS: cosConfig,
});

let client = new OssClient({
    OSS: ossConfig,
});

Api

get(key: string): Promise<Buffer>;

put(key: string, object: Buffer | string, meta?: OssMeta): Promise<OssPutRes>;
putFile(key: string, object: string, meta?: OssMeta): Promise<OssPutRes>;
del(key: string): Promise<boolean>;
ls(key: string): Promise<boolean>;
has(key: string): Promise<boolean>;