Skip to content

gx761/egg-s3

Repository files navigation

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

About

AWS s3 plugin for egg js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published