1
0
Fork 0
mirror of synced 2024-10-02 18:16:29 +13:00

Check for blank string

This commit is contained in:
Mel O'Hagan 2022-06-15 13:16:30 +01:00
parent cdf069abbc
commit ca04f3be6f

View file

@ -114,7 +114,10 @@ exports.getSignedUploadURL = async function (ctx) {
// Determine type of datasource and generate signed URL
let signedUrl
let publicUrl
const AWS_REGION = datasource?.config?.region ?? "eu-west-1"
const AWS_REGION =
datasource?.config?.region?.length > 0
? datasource?.config?.region
: "eu-west-1"
if (datasource.source === "S3") {
const { bucket, key } = ctx.request.body || {}
if (!bucket || !key) {