Nodebb 0.7.0
Theme: Lavender
Even though it does not seem to choose the settings.
Help.
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
Please report this on our github. Thanks.
@baris I will note that this is indeed a very long post.
But still, I have published it before, So why not let him edit? ...
Maybe the post was made pre 1.16.0 where it was using socket.io and now on 1.16.0 it is going through the write api and express so it is limiting the body size.
@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