File on form submission not working

Describe the problem/error/question

I’ve created a single node workflow for a Form submission trigger
The only Form element is File (for file upload)
The aim is to capture via camera some documents to upload.
If I choose a csv or text file it seems OK.
Anything else it hangs or I get an error.

What is the error message (if any)?

Problem submitting response
It either hangs or shows the message below:
The form could not be submitted. Please check your connection and try again, or contact support if the problem persists.

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“formTitle”: “File Upload”,
“formDescription”: “Choose Files to upload”,
“formFields”: {
“values”: [
{
“fieldLabel”: “File Upload”,
“fieldType”: “file”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.formTrigger”,
“typeVersion”: 2.6,
“position”: [
0,
0
],
“id”: “02ad56f2-50bb-4eb3-89c2-b17e6dccacbd”,
“name”: “On form submission”,
“webhookId”: “5712f1df-986d-476d-8166-4038f8fb283d”
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“instanceId”: “d49b29a44b4ec61dc23f109139c78839fcaac1a073f1aa1bafd384bfee259973”
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

No output when it fails

Information on your n8n setup

It’s n8n self-hosted LXC on Proxmox

  • n8n version: 2.30.0
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Proxmox LXC
  • Operating system: Proxmox LXC

I would first isolate whether the failure follows file size rather than file type. Phone photos are usually much larger than CSV or text files. Try the same JPEG resized to about 100 KB, then a multi-megabyte copy, and check the failed request status in the browser Network panel plus the n8n service logs.

On self-hosted n8n, the documented defaults include N8N_PAYLOAD_SIZE_MAX=16 MiB and N8N_FORMDATA_FILE_SIZE_MAX=200 MiB. A reverse proxy can impose a lower request-body limit before n8n sees the upload, so also check the proxy response and its upload setting. If possible, compare one safe local submission directly to the n8n service with the public proxied form.

If a small JPEG fails while an equally sized text file succeeds, please share the HTTP status and the relevant sanitized log line. That would separate a MIME or Form Trigger issue from a size limit and make the next step much clearer.

Thanks, one of the image files that fails to upload is 30KB!!
Also, as the workflow keeps processing with the error, there are no logs I can see.

That 30 KB result is useful. It makes the n8n payload-size defaults very unlikely, and the missing execution suggests the request is failing before the Form Trigger creates a run.

For the next split, open the browser Network panel, submit that exact file, and note the POST status plus any response text. Also re-encode the same image as a real JPEG or PNG, rather than only changing its extension, and retry. If the converted copy works, the likely issue is the original MIME type or image encoding, such as HEIC. If it still fails, compare the proxied form with one safe local request directly to n8n.

A 413 would point back to a request-body limit, 403 or 406 would suggest a proxy or WAF content rule, and a 5xx needs the proxy and n8n service logs at that timestamp. Can you share the failing request status and Content-Type?

Hi, thanks for your help, it was actually a size isssue.

I added:
client_max_body_size 100m;

In the server section of:
/etc/nginx/conf.d/default.conf
/etc/nginx/conf.d/production.conf

Restarted the container in Proxmox and now I seem to be good!!

@agallagher In your form, check this make sure its empty to submit all file types, good you figured it out though!