parent
deec85be14
commit
2d22573588
|
@ -1,4 +1,12 @@
|
|||
const AWS = require('aws-sdk');
|
||||
const config = {};
|
||||
if (typeof process.env.AWS_S3_ENDPOINT !== 'undefined') {
|
||||
config['endpoint'] = process.env.AWS_S3_ENDPOINT;
|
||||
}
|
||||
if (typeof process.env.AWS_S3_USE_PATH_STYLE_ENDPOINT !== 'undefined') {
|
||||
config['s3ForcePathStyle'] = process.env.AWS_S3_USE_PATH_STYLE_ENDPOINT == 'true' ? true : false;
|
||||
}
|
||||
AWS.config.update(config);
|
||||
const s3 = new AWS.S3();
|
||||
|
||||
class S3Storage {
|
||||
|
|
Loading…
Reference in New Issue