egg-s3
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.