Retool File file upload not working

  • Goal: I want to access and upload files that were selected via an image picker element.

  • Steps: I previously will access the image picker values and loop through them. For each I will call the uploadtoS3 using the S3 tool. However, I am noticing that the file is not being uploaded. Instead the filepath is being uploaded as a document. This only happens on the mobile app where i have notice the file returns RNFetchBlob-file:///var/mobile/Containers/Data/Application/2F5A25AA-004F-4E14-A490-A14809CCAA2F/Documents/cachedImages/C7F59570-8D01-4FFA-A859-4F4D320E098E.jpg. When I try in the retool mobile simulator the code below works just fine and uploads the actual image to S3 bucket. The file in the simulator returns a format like blob:https://****.retool... and that file leads to an actual image when copied into the browser url.

  • Details: const uploadPromises = returnimages.value.map((file) => {
    console.log(file);
    return uploadToS3.trigger({
    additionalScope: {
    fileInput: file,
    fileName: ${Array(32) .fill() .map(() => Math.random().toString(36)[2]) .join("")},
    },
    });
    });

Hi @Dev_Ops,

That is odd that the query seems to be trying to upload the filepath as a document instead of an image file.

I am a little confused by the 'simulator' are you talking about when in editor mode of a mobile app?

If you could share a screen shot of the query as well I can look to reproduce this and see if I need to file a bug report. Was this working fine before and just stopped working?