Hello,
I'm having no problem reading from a bucket in my google storage account, but when I try to write to one, I'm having some issues.
I've configured the cors policy on my bucket as follows:
{
"origin": ["https://{{my_organization}}.retool.com"],
"method": ["PUT", "GET", "POST", "HEAD", "DELETE"],
"responseHeader": ["Content-Type", "x-goog-acl"],
"maxAgeSeconds": 3600
}
]
The configuration for my events is as shown:
With the following trigger:
async function blobToBinaryWrapper(blobs) {
for (let i = 0; i < blobs.length; i++) {
let blob = blobs[i];
let base64 = await utils.getDataByObjectURL(blob);
base64 = base64.split("base64,")[1];
upload_completion_photo.trigger(
{
additionalScope: {
imageData: base64,
imageName: "test.jpg",
}
}
);
}
}
blobToBinaryWrapper(completion_image_upload.value);
Any help would be much appreciated. I'm pretty stumped. I'm trying to upload photos that have been uploaded through the image upload component.
I'm getting a 400 error, which leads me to think that maybe my content type or data format is incorrect.