Skip to content

a s3 storage wrapper for cnpmcore nfs, which based aws-sdk 2.x

Notifications You must be signed in to change notification settings

hezhengxu2018/s3v2-cnpmcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3v2-cnpmcore

a S3 storage wrapper which based on aws-sdk 2.x for cnpmcore

Installation

npm i s3v2-cnpmcore

Usage

you should set env variables before run nodejs application in production:

AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE=1
import S3v2Client from 's3v2-cnpmcore';

// ...
// other configuration in cnpmcore
// ...

// api reference(https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html)
config.nfs.client = new S3v2Client({
  endpoint: 'your endpoint',
  key: 'your access key',
  secret: 'your secret key',
  bucket: 'npm',
  // optional
  region: 'eu-west-1', // default is ''
  // optional
  disableURL: true // default is false, set true when S3 provider can not provide anonymous url
})

License

MIT

About

a s3 storage wrapper for cnpmcore nfs, which based aws-sdk 2.x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published