This commit is contained in:
Martin McKeaveney 2024-05-15 14:54:32 +01:00
parent a46e109ca6
commit 45e4e791a5
1 changed files with 1 additions and 3 deletions

View File

@ -314,11 +314,9 @@ export const getSignedUploadURL = async function (ctx: Ctx) {
signedUrl = s3.getSignedUrl("putObject", params)
if (datasource?.config?.endpoint) {
publicUrl = `${datasource.config.endpoint}/${bucket}/${key}`
}
else {
} else {
publicUrl = `https://${bucket}.s3.${awsRegion}.amazonaws.com/${key}`
}
} catch (error: any) {
ctx.throw(400, error)
}