The file upload field isn't working on the mobile application

When checking the value of an uploaded file in a mobile application, it comes as null:

Can you share more about how your app is structured? From this screenshot it's not clear what is actually meant to happen.

Hi, thank you for your response. I have a form with a file input and a button. Upon clicking the button, I display the file's content in a message.

image

image

I'm not able to reproduce this issue. Can you share an export of your app?

Hi, thank you for your response. As a new user, I can't attach files. I'll send a Google Drive link. Please test it from your mobile device using the Retool mobile app, as it works fine from the PC web browser.

https://drive.google.com/file/d/1XkWCsGOQy4c26PVrwNF32vXcweitwqMN/view?usp=sharing

Seems to work for me on both iOS and Android. Can you share more details about your device? Possibly some security setting making it not possible for the Retool app to access files?

Hello, I've generated an application where the indicated error occurs. I've also attached a CSV file for the creation of the table used. As you can see in the image, the 'rec_file' field doesn't capture the value of the uploaded file.

App: Expenses.json - Google Drive

Table: receipt.csv - Google Drive

image

This looks like a bug with form.data not updating correctly with file inputs. (Specifically formAdd.data.rec_file is always empty.)

You can work around it by referencing fileInputReceipt.value directly. Your uploads should work in that case. Thank you for reporting this issue!

2 Likes