Form Upload Files Problem

Hi all,

My Form node has a weird behavior.

I have a form, where allow user to upload some documents. But I notice if the user upload the files that is larger than 4mb - 5mb in size, it will not process. The selected files seems to reset.

I have tried to troubleshoot in every possible ways, but no avail. Could this be a bug? Please advise :pray:t2:

Video link: Video recording

Additional information

  • N8N is self hosted using Docker
  • DB is Postgres
  • Using Nginx for Reserve proxy
  • N8N_PAYLOAD_SIZE_MAX=64M
  • N8N_DEFAULT_BINARY_DATA_MODE=filesystem
  • Nginx config: client_max_body_size 128M

Hi, I tested your file with the form node. But I couldn’t recreate your issue. I’m also self-hosting. Could you share your workflow?

Hello @KahChon87 welcome to the community! :slight_smile:

When using the Form node in n8n (especially with file uploads), files larger than ~5MB may silently fail to upload or get “reset” it’s not necessarily a bug in your setup, but rather a limit in how n8n handles form-based uploads.

What you can do:

  1. Reduce file size (if possible)

If you have control over what users upload, try to limit files to under 4MB per upload.


  1. Use an external upload service

Instead of uploading directly via the Form node, you can:

  • Use a file upload service like Uploadcare, Filestack, or Google Drive
  • Implement a mechanism to split large files into smaller chunks before uploading

  1. Host n8n yourself and increase upload limits
    If you’re self-hosting n8n, you can adjust the maximum allowed file size by setting the N8N_FORMDATA_FILE_SIZE_MAX environment variable

Documentation: Environment Variables Overview | n8n Docs


Cheers

Hi @Grot ,

Sure… here’s the workflow that I used for troubleshooting.

Basically what it does is, the user will upload the documents based on the designated file category, because I can’t control how many file they need to upload, so I enabled “Multiple File” option.

Next I will created a folder on my Google Drive and name the folder based on what the user input in the earlier form. Then I use code node to rearrange the uploaded files, zip it and finally upload the zipped file to Google Drive.

Hi @Gallo_AIA ,

Thank you for the advice. Currently I’m not able to control the file size that being uploaded, because the form is being used by the public, it’s hard to educate them.

I immediately transfer the file to Google Drive after users upload the file.

I will try if N8N_FORMDATA_FILE_SIZE_MAX works. Thanks.