Uploading Image to GCS on mobile

Hi,

I am working on a mobile app which has a form to submit. The form takes an image and uploads it to GCS in binary. When I test the form submission on the app in my browser, everything works as expected but when I try to do it on mobile through the Retool app, I get the following error.

I am not sure how to resolve this error.

Hey @raied, are you still running into issues?

There's a thread here that may help with uploading image files. Have you already been using utils.getDataByObjectURL?

I have looked into the thread there, and while ive been able to get the base64 string and upload it to gcp as file.jpg the image is still just a string. is there a way to make it so that the file on gcp gets saved as a jpg?

Hey @cworf!

Would you mind sharing the configuration of your upload query? You may need to manually parse out the base64 data and then upload it using the application/octet-stream filetype as mentioned in this thread:

There's an open bug report to address the typing issue linked to the thread mentioned above, I'll attach the feedback here to it as well. Let me know if that works for you!

@Kabirdas
I actually ended up figuring it out it was definitely the content-type. I didnt realize I could type in a custom one at first. though I ended up using "image/jpeg". works just fine now!

Do you have mandatory Images ? (like the required option for the component) How did you settle up?