Merge pull request #1505 from matejc/master

fix(s3): replace dash with dot for s3 endpoint
This commit is contained in:
David Mehren 2021-08-05 09:38:10 +02:00 committed by GitHub
commit c3c8a7ad8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ exports.uploadImage = function (imagePath, callback) {
if (config.s3.endpoint) { if (config.s3.endpoint) {
s3Endpoint = config.s3.endpoint s3Endpoint = config.s3.endpoint
} else if (config.s3.region && config.s3.region !== 'us-east-1') { } else if (config.s3.region && config.s3.region !== 'us-east-1') {
s3Endpoint = `s3-${config.s3.region}.amazonaws.com` s3Endpoint = `s3.${config.s3.region}.amazonaws.com`
} }
callback(null, `https://${s3Endpoint}/${config.s3bucket}/${params.Key}`) callback(null, `https://${s3Endpoint}/${config.s3bucket}/${params.Key}`)
}) })