Unable to edit large post - request entity too large
-
I'm trying to edit a post I previously wrote in my forum, and I'm unable to save changes by saying:
Payload Too Large
That I'm checking nodeb log:
2020-12-27T00:52:06.352Z [4567/9792] - [31merror[39m: /api/v3/posts/3 PayloadTooLargeError: request entity too large
Certainly this is not a problem in NGINX that is set to:
client_max_body_size 100M;
Running NodeBB 1.16.0
-
@baris is correct, it is an error thrown by express because the large post is larger than the system default.
See http://expressjs.com/en/resources/middleware/body-parser.html#bodyparserjsonoptions
In NodeBB, we assume the default provided by body-parser, which is 100kb
If you want to support longer posts, update this value by adding this to your
config.json
{ ... "bodyParser": { "json": { "limit": "1mb" } }
I take no responsibility for whether these values actually work, but I think they should
Copyright © 2024 NodeBB | Contributors