Express File Upload Limit

Expected behavior

We should not get a parsing error when uploading a file of 8.5MB with a body parser limit of 10MB

Actual behavior

With a body parser limit of 10MB we get the following error when trying to upload a file of 8.5MB
“PayloadTooLargeError: request entity too large”
However if we increase the parser limit to 12MB we don’t get any error uploading the same file


In the app.js file we use the following line to set a limit of 10MB for JSON body parser :
“app.use(bodyParser.json({ limit: ‘10mb’ }))”

Our configuration is the following :

  • Express Version: 4.17.1
  • Sequelize Version: 4.0.2

Hi @sebpsdev !
Welcome in the Forest community!

It looks like this is a known issue.
Could you check this thread and telling me if it resolved it :wink:

@sebpsdev Since you asked an additional question in the main thread, I consider this one is resolved if you don’t mind (still, feel free to re-open it if required). By the way, I answered your question here!