Error uploading with file input on mobile device

The fileDropzone I am using in the webapp appears to work correctly, the file clears out when the clearValue is triggered.

In the mobile app, the file input does not appear to be functioning correctly at all. In the IDE I can pull the file data and run my query, however when testing on an iPhone and Android Tablet I get an error.

Hey @Peter_Kunz split this out as it's a different issue. Just tested uploading an image from the file Input component on an android device and it seems to work. Can you share the query you are using to upload? Also how you are getting the file into the component? The url in that screenshot seems potentially malformed.

I sent you a DM with my query

Hey @Peter_Kunz thanks for the info. We don't work out of our DMs so keeping all communication here is best. We are notified regularly when responses are posted and it keeps all relevant information here for others to see / learn from / give their input on.

I'm able to reproduce the behavior of the error in the JS function you are using. Looking into the error with the team and I'll get a bug report over to the mobile eng team as well. This doesn't appear to be an error with the component itself, as it works when you use the fileInput data directly in an upload query. But rather with the JS that is being run to parse data, check conditions etc.

I'll update you here as I get any more information to share.

Hey @Peter_Kunz, so far in testing, it looks like the error only occurs when referencing the file uri. Which happens to be the same as the fileInput.value. Switching over to that reference seems to work for me, can you give that a try.

In your code here:
uploadFile.type = file.file.type;
uploadFile.base64Data = file.file.uri.split(',')[1];

If you switch to file.value.split(',')[1] does this JS query run without error?

Still getting a report over to the team, just wanted to see if that was a viable workaround. Thanks!

I switched to file.value and it appears to be working on the mobile device now. Thanks

1 Like