mirror of https://github.com/status-im/codimd.git
Remove checks for protocol before removing port
Signed-off-by: Thor77 <thor77@thor77.org>
This commit is contained in:
parent
e928893cfe
commit
87ba625d46
|
@ -40,7 +40,7 @@ exports.uploadImage = function (imagePath, callback) {
|
|||
callback(new Error(err), null)
|
||||
return
|
||||
}
|
||||
let hidePort = (protocol === 'http' && config.minio.port === 80) || (protocol === 'https' && config.minio.port === 443)
|
||||
let hidePort = [80, 443].includes(config.minio.port)
|
||||
let urlPort = hidePort ? '' : `:${config.minio.port}`
|
||||
callback(null, `${protocol}://${config.minio.endPoint}${urlPort}/${config.s3bucket}/${key}`)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue