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

If you're self-hosting Appsmith and using a reverse proxy server such as Nginx, a load balancer, or Caddy, it's important to configure the size limits in the reverse proxy server to allow large file uploads.

To allow uploads of large files, you need to adjust the relevant parameters in your reverse proxy server's configuration:

  • Nginx:

    Add or modify the client_max_body_size parameter in your Nginx configuration. For example, to allow uploads of up to 150 MB:

    client_max_body_size 150M;
    
  • Caddy:

    Set the max_request_body directive at the Caddy configuration level. For example, to allow uploads of up to 150 MB:

    max_request_body 150MB
    
  • Load balancer (if applicable):

    Adjust the proxy settings to ensure large file uploads are permitted. For example, to allow uploads of up to 150 MB:

    proxy-body-size 150M;
    

Each reverse proxy has slightly different directives, so it's essential to ensure that the changes match your infrastructure.