mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 18:56:32 -05:00
fix(s3): replace dash with dot for s3 endpoint
According to the AWS documentation there is no situation that there is a dash in `s3-<region>.amazonaws.com`, the correct way is with a dot `s3.<region>.amazonaws.com` Source: https://docs.aws.amazon.com/general/latest/gr/s3.html Signed-off-by: Matej Cotman <matej.cotman@eficode.com>
This commit is contained in:
parent
8ab173e994
commit
65fac143f6
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ exports.uploadImage = function (imagePath, callback) {
|
|||
if (config.s3.endpoint) {
|
||||
s3Endpoint = config.s3.endpoint
|
||||
} 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}`)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue