Remove File Upload Limits (Currently 40MB) in Hosted Version

Currently there is a 40MB limit for files using the File Input component. This limit only exists for the hosted version. The platform should not limit the size of file being selected for upload.

Also, it's not obvious when using the component currently that there is a file size limit. The behavior is such that selecting a large file seems to work when it doesn't.

Hey @corytomlinson!

Thanks for surfacing this! I'll pass this along to the team to see if we can make our documentation on this a bit clearer.

The file upload limit is currently in place due to the multi-tenant nature of the cloud version of Retool. It is possible to upload larger files with the File Input component and then interact with them as long as that doesn't require passing them through the Retool backend.

Thanks Kabirdas. Would still like to see a higher limit than 40MB.

Also, it's not my experience that you can load files larger than 40MB into the component. When I try it just silently fails. Doesn't work and doesn't produce error.

I can definitely imagine that, Bradly actually just posted a feature request about adding more support for large file uploads here. It's a good place to follow along to see if it gets supported and also give your +1.

As for loading the file into your app - could you share what exactly you're trying to do with it and how you're noticing that it's failing?

This is already a feature request. That post is a duplicate of this one.

I'm trying to upload files to S3. When the file selected by the input component is larger than 40MB exactly nothing happens. It fails silently leaving the user confused.

Got it, that certainly shouldn't be happening, at the very least there should be some indication that the selection has failed. Since I haven't been able to reproduce this on my end, do you have an app export you can share, or is there somewhere we can step in and observe the behavior?

Wanted to follow up with you about this comment...

It is possible to upload larger files with the File Input component and then interact with them as long as that doesn't require passing them through the Retool backend.

What exactly does it mean to pass a file through the Retool backend? What I'm trying to accomplish is an upload to S3.

Requests in Retool aren't made directly from your browser, instead, they're made from the backend of your application. You can see a high-level overview of what a typical Retool deployment might look like:

When you make a request, it first travels to the DB Connector container, which makes the actual query to your resource, and then the query result travels back to your browser (the data itself isn't stored in the backend unless you choose to cache your query). The primary difference between Cloud and Self-Hosted is that Self-Hosted customers host everything within that larger "Retool" box themselves and can choose how they want to do load balancing etc. Cloud customers, on the other hand, have it hosted by us and so multiple different orgs might be sending their requests through the same DB Connector container.

That all being said :sweat_smile: when you first use a file picker component to select a file that should load the file's data into the browser's memory. There's no strict limit there to what can be uploaded but there is a soft limit at the moment in that if you actually try and manipulate a large chunk of data within your browser it could drastically slow things down. The strict limit comes the moment you try and send that data off to your resource through Retool's backend.

This workaround was made in order to send requests directly from the browser to avoid going through Retool's backend and therefore also avoid hard limits to file uploads, it also uses custom components to avoid overloading Retool's frontend with data. The workarounds for uploading large files are rather complex though and don't offer much of the support that Retool does through its integrations so it's definitely useful for the devs to know that more people are trying to do this.