File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ module.exports = {
40
40
s3 : {
41
41
accessKeyId : process . env . CMD_S3_ACCESS_KEY_ID ,
42
42
secretAccessKey : process . env . CMD_S3_SECRET_ACCESS_KEY ,
43
- region : process . env . CMD_S3_REGION
43
+ region : process . env . CMD_S3_REGION ,
44
+ endpoint : process . env . CMD_S3_ENDPOINT
44
45
} ,
45
46
minio : {
46
47
accessKey : process . env . CMD_MINIO_ACCESS_KEY ,
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ exports.uploadImage = function (imagePath, callback) {
42
42
}
43
43
44
44
let s3Endpoint = 's3.amazonaws.com'
45
- if ( config . s3 . region && config . s3 . region !== 'us-east-1' ) {
45
+ if ( config . s3 . endpoint ) {
46
+ s3Endpoint = config . s3 . endpoint
47
+ } else if ( config . s3 . region && config . s3 . region !== 'us-east-1' ) {
46
48
s3Endpoint = `s3-${ config . s3 . region } .amazonaws.com`
47
49
}
48
50
callback ( null , `https://${ s3Endpoint } /${ config . s3bucket } /${ params . Key } ` )
You can’t perform that action at this time.
0 commit comments