Check for blank string
This commit is contained in:
parent
cdf069abbc
commit
ca04f3be6f
|
@ -114,7 +114,10 @@ exports.getSignedUploadURL = async function (ctx) {
|
||||||
// Determine type of datasource and generate signed URL
|
// Determine type of datasource and generate signed URL
|
||||||
let signedUrl
|
let signedUrl
|
||||||
let publicUrl
|
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") {
|
if (datasource.source === "S3") {
|
||||||
const { bucket, key } = ctx.request.body || {}
|
const { bucket, key } = ctx.request.body || {}
|
||||||
if (!bucket || !key) {
|
if (!bucket || !key) {
|
||||||
|
|
Loading…
Reference in New Issue