Category: UI Widgets
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

FilePicker file size limit

Issue

I have a self-hosted installation of AppSmith and I want to get the name of a selected file from my local disk to insert it into my local database. However, the FilePicker widget only allows a maximum file size of 100MB, despite not attempting to put it into the cloud. I have tried setting the APPSMITH_CODEC_SIZE parameter in the env file but it did not work. Additionally, it seems that it is not possible to read the path of the selected file unless there is a way to do so using JavaScript. I have checked for ENV file parameters documentation but cannot find any. The AppSmith team has confirmed that there is a 100MB max file size limit on the FilePicker widget and has raised an issue on Github to consider increasing it. There is a suggested workaround on Github, but I am still waiting for confirmation if it works.

Resolution

The user has a self-hosted installation of AppSmith and wants to retrieve the name of a selected file from the local disk to insert it into a local database. They placed a FilePicker widget on the form to read the selected file's name using {{FilePicker1.files[0].name}}. However, the FilePicker widget allows a maximum file size of 100MB, which is a hardcoded limit. The user tried changing the APPSMITH_CODEC_SIZE variable in the env file, but it did not work.

The AppSmith team confirmed that there is indeed a 100MB limit on the FilePicker widget. They raised an issue on Github to consider increasing the limit. In the meantime, a workaround suggested on Github is to split the file into smaller chunks and use the S3 upload API to upload them in parallel. The chunks can be reassembled on the server-side. Another workaround is to use a different file picker that allows larger files or to use a script on the client-side to read the selected file's path instead of using the FilePicker widget.