Increasing maximum file size upload

My instance of FlowForge is returning an HTTP 413 “Request Entity Too Large” response when uploading a file with a size around 1.4MB, but works with a file size of 60KB. In a typical configuration, I would edit the nginx environment variable or set a property in the .htaccess file. How do I increase the maximum upload file size with FlowForge? I have not been able to find anything in the documentation.
Thank you,

John K.

Hi @jkanalakis what do you mean by upload file? Are you using http-in node? File node?

Where is the error being generated & what do you do to make it happen!

Perhaps you could share a minimal flow and stepwise instructions to recreate the issue?

Also, it would be useful to know your environment. Are you using FlowForge cloud or a local installation?

Thanks.

The file limit for FlowForge Cloud is 10MB: FlowForge Cloud • FlowForge Docs, so that shouldn’t be the issue.

Using an HTTP in node to POST a file over 1MB large I can reproduce. It results in a 413 as described @Steve @jkanalakis

The HTML response indicates it’s from Node-RED:

PayloadTooLargeError: too many parameters
   at queryparse (/usr/src/node-red/node_modules/body-parser/lib/types/urlencoded.js:151:13)
   at parse (/usr/src/node-red/node_modules/body-parser/lib/types/urlencoded.js:75:9)
   at /usr/src/node-red/node_modules/body-parser/lib/read.js:128:18
   at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
   at invokeCallback (/usr/src/node-red/node_modules/raw-body/index.js:231:16)
   at done (/usr/src/node-red/node_modules/raw-body/index.js:220:7)
   at IncomingMessage.onEnd (/usr/src/node-red/node_modules/raw-body/index.js:280:7)
   at IncomingMessage.emit (node:events:539:35)
   at endReadableNT (node:internal/streams/readable:1345:12)
   at processTicksAndRejections (node:internal/process/task_queues:83:21)

Flow I used to reproduce:

[
    {
        "id": "1d4cd2dc2b763e93",
        "type": "http in",
        "z": "29c2b97c427acc89",
        "name": "POST a file",
        "url": "/post-file",
        "method": "post",
        "upload": true,
        "swaggerDoc": "",
        "x": 180,
        "y": 320,
        "wires": [
            [
                "a0e4344e2abac0e9",
                "27fdcb915c3e7a01"
            ]
        ]
    },
    {
        "id": "a0e4344e2abac0e9",
        "type": "file",
        "z": "29c2b97c427acc89",
        "name": "Write test-file",
        "filename": "/test-file",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 390,
        "y": 320,
        "wires": [
            [
                "cf506e90560fa829",
                "6c2799871375e22f"
            ]
        ]
    },
    {
        "id": "cf506e90560fa829",
        "type": "debug",
        "z": "29c2b97c427acc89",
        "name": "Debug file write",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 640,
        "y": 400,
        "wires": []
    },
    {
        "id": "6c2799871375e22f",
        "type": "http response",
        "z": "29c2b97c427acc89",
        "name": "Response",
        "statusCode": "201",
        "headers": {},
        "x": 620,
        "y": 320,
        "wires": []
    },
    {
        "id": "27fdcb915c3e7a01",
        "type": "debug",
        "z": "29c2b97c427acc89",
        "name": "Debug request",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 380,
        "y": 400,
        "wires": []
    }
]

Hi @jkanalakis, working on the assumptions we made about your situation, I believe we have found and adjusted the necessary setting to permit your upload.

I would greatly appreciate feedback either way.

Thanks, Steve.

Hello Steve and zj,

Thank you both for your replies. I truly appreciate the time you put into your responses. @zj, you reproduced the problem exactly. I was attempting to receive large files (1-2MB) via HTTP POST using the “http in” node. It sounds like a NodeRed issue and not a FlowForge issue. @Steve, how have you adjusted the setting? I have FlowForge running on a DigitalOcean droplet, so I probably need to make a change and rebuild the Docker container.

Thank you,

John K.

@jkanalakis Thanks for getting back to us.

For FlowForge Cloud we’ve made some changes to the load balancer, not to Node-RED to allow files up to 100MB to be POST’ed. I recommend you update your load balancer, the nginx-proxy container, to allow larger files too.