1.0.1 • Published 5 years ago

@hyu/s3-cnpm v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

s3-cnpm

Build Status codecov

s3 wrapper for cnpmjs.org NFS

It can support the use of OSS COS S3

Usage

npm install @hyu/s3-cnpm
const s3 = require('@hyu/s3-cnpm')

const client = s3.create({
  mode: 'public or private'
  accessKeyId: 'S3 accessKeyId' // COS SecretId or OSS AccessKey ID
  secretAccessKey: 'S3 secretAccessKey' // COS SecretKey or OSS Access Key Secret
  endpoint: 'your service endpoint' // e.g. cos.ap-shanghai.myqcloud.com
  bucket: 'your service bucket name' // e.g. npm
  region: 'your service region' // e.g. ap-shanghai
})

Test

Create an .env file in the project root directory

ACCESS_KEY_ID=SOMETHING
SECRET_ACCESS_KEY=SOMETHING
ENDPOINT=SOMETHING
BUCKET=SOMETHING
REGION=SOMETHING

Liecnse

MIT

1.0.1

5 years ago

1.0.0

5 years ago