Merge branch 'develop' of github.com:hackmdio/codimd into develop

This commit is contained in:
BoHong Li 2019-04-15 14:11:50 +08:00
commit 4e596d724d
No known key found for this signature in database
GPG Key ID: 9696D5590D58290F
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ exports.uploadImage = function (imagePath, callback) {
callback(new Error(err), null)
return
}
callback(null, `${protocol}://${config.minio.endPoint}:${config.minio.port}/${config.s3bucket}/${key}`)
let hidePort = [80, 443].includes(config.minio.port)
let urlPort = hidePort ? '' : `:${config.minio.port}`
callback(null, `${protocol}://${config.minio.endPoint}${urlPort}/${config.s3bucket}/${key}`)
})
})
}