Mobile App Camera S3 upload issue from iOS

I got beta access to the mobile product the other day, and I was tinkering around with it (it's pretty nice overall). I'm trying to build a simple app to just take a photo and then upload it to a bucket on AWS S3.

Everything works great from the desktop when I test the app. The camera opens, I take a photo, tap 'Save', it is successfully uploaded to S3, and displays correctly as the photo.

When I try to do the same thing from the app on my iPhone it doesn't work. The upload runs, but I end up with a file like this:

I'm guessing there is something different in the value the iPhone gives to the camera component, but I don't know of any way to inspect that to try and find out what is going on.

In my S3 upload query:

  • My S3 Content-Type is set to: {{ camera1.files['0'].type }}
  • Upload data is set to: {{ camera1.value['0'] }}

Any ideas what I need to do to make it work from the iPhone app?

1 Like

Hi @benbarry, thanks for letting us know -- our team is currently working on a fix for this!


Hi @benbarry! Just a heads up that a fix for this issue was released in version 2.103.3 of the Retool Mobile app -- please update when you get a chance and test if it's working?

@shawntax still seems to be broken for me. Do I need to change anything in my Retool app?

Still works fine from the desktop web browser. Here is the link to the photo uploaded via desktop:

Here is the link to the photo uploaded via mobile app:

Here is what I see in the app, and the version # info:

Hi @benbarry! Really sorry for the delay here, we're getting up and running again after the Thanksgiving break.

I just checked with our engineers, and they informed me that for image uploads you currently need to set the Content-Type to be "Binary".

Could you try hard-coding that instead of the JS expression you're using now?


So, that does work. However, if you try to open the specific image link in a new browser window it forces the file to be downloaded rather than being actually displayed.


Hey @benbarry ~ hmm, I think that's happening because of the conflicting Content-Type required.

For Mobile apps, we need the Content-Type to be "Binary" for the upload to work correctly.

For browsers previewing content in S3 buckets (and content in general), the file needs the appropriate Content-Type in order to handle previews correctly -- in this case, "image/png" or "image/jpeg".

I will dig and see if there is a way to dynamically set the Content-type depending on if we're on mobile or web.


I have a similar problem with an iphone 12 and google cloud.

From the computer I select the file and it uploads correctly to my google drive account, then I can see it.
From the iphone, the photo taken with the camera or chosen from the library is never uploaded.

Do you have any idea what I'm doing wrong?