We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f0fe69 commit e928893Copy full SHA for e928893
lib/web/imageRouter/minio.js
@@ -40,7 +40,9 @@ exports.uploadImage = function (imagePath, callback) {
40
callback(new Error(err), null)
41
return
42
}
43
- callback(null, `${protocol}://${config.minio.endPoint}:${config.minio.port}/${config.s3bucket}/${key}`)
+ let hidePort = (protocol === 'http' && config.minio.port === 80) || (protocol === 'https' && config.minio.port === 443)
44
+ let urlPort = hidePort ? '' : `:${config.minio.port}`
45
+ callback(null, `${protocol}://${config.minio.endPoint}${urlPort}/${config.s3bucket}/${key}`)
46
})
47
48
0 commit comments