mirror of https://github.com/status-im/codimd.git
Merge pull request #1095 from Thor77/fix-1094
Hide default ports from minio image upload urls
This commit is contained in:
commit
48a68e015b
|
@ -40,7 +40,9 @@ exports.uploadImage = function (imagePath, callback) {
|
||||||
callback(new Error(err), null)
|
callback(new Error(err), null)
|
||||||
return
|
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}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue