egg-s3

1.0.2 • Public • Published

egg-s3

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-s3 --save

Usage

// {app_root}/config/plugin.js
exports.s3 = {
  enable: true,
  package: 'egg-s3',
};

Configuration

// {app_root}/config/config.default.js
exports.s3 = {
  app: true,
  agent: false,
  maxAsyncS3: 20,     // this is the default
  s3RetryCount: 3,    // this is the default
  s3RetryDelay: 1000, // this is the default
  multipartUploadThreshold: 20971520, // this is the default (20 MB)
  multipartUploadSize: 15728640, // this is the default (15 MB),
  s3Options: {
  accessKeyId: 'xxxx',
  secretAccessKey: 'xxxx',
  region: 'test',
  endpoint: 'http://www.google.com',
  sslEnabled: false,
  s3ForcePathStyle: true,
},
};

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i egg-s3

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • royguo