Viewer Can't Upload file in Retool Storage

I have an App (58132f89-fbe8-400d-8251-49209a89ac51) that acts as a feature request form. As a logged-in admin, I have no trouble filling it out and it works as intended. However, if I log in as a Viewer (what everyone else in my organization will be) - the file upload fails. Interestingly, all the other text-based fields work, but the actual file upload will error out.

  • When file is uploaded into field, the 'uploadFile' query runs
  • 'uploadFile' accesses Retool Storage to upload the file from the field
  • The file fails to upload at this step
  • Error: UploadFile: Status 500, Cannot read properties of undefined (reading ‘organization’)

This works fine when I'm logged-in as an Admin, but fails if trying as a Viewer on the Public link. Due to this, it is my impression that this is a permissions error of some kind.

Is there any way to let Viewers upload files to Retool Storage without manually adding them to the Organization?

Upload component with upload to file storage isn't yet supported for public apps. As an alternative, you can create a file storage query to upload and pass the component data to it and uncheck the upload to file storage option on the component. Let me know if that doesn't work for you

Hi Himanshu,

I appreciate your help, but am still running into some issues. Apologies if I am misunderstanding you.

I have created a simpler app to use just as an example so I can better understand the alternative you describe.

Please look at 5bcfe709-4bad-4b4d-9f0c-2c5c61de80c6. Here is how it works:

  • fileComponent is an upload field. Users can drop a file here.
  • The name and base64 data is automatically pulled from whatever is in the fileComponent field.
  • User clicks big blue button to run the Retool Storage query.
  • Retool Storage query pulls the base64 data directly from the component box.
    *Retool Storage fails on public app (but works in Preview).

In this example the File Storage Query is being triggered manually by button click and is being given base64/name data directly. Note 'Upload file to Retool Storage' is unchecked.

Can you please help me understand what needs to change in this example App to allow file uploads when Public?

Thank you again,

1 Like

You're right. This is a bug on our end. I will fix this and share an update. Thank you!

3 Likes

Any update on this one? I have the same issue

to clarify when i try to upload in public app i get an authentication error and it redirects me to the login page

like OP the app works fine in edit mode

No update yet. Targeting mid Jan for a fix here.

Heads up: we will have a fix released on Wednesday Jan 10 by 5 PM PST, which will make the solution noted in this comment work