mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-02 06:12:27 -05:00
commit
5379d65edc
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue