I am trying to upload file using strapi upload api. I get 413 error

Same here. Any evolution?

My strapi version 4.3.8

I’m trying to upload a PDF file with 5MB. Before to know what was the problem, i thought the problem was CORS. But when i upload a PDF with 800kb, it works.

I added on my middlewares.js file the follow code:

// ...
{
    name: "strapi::body",
    config: {
      jsonLimit: "20mb",
      formLimit: "20mb",
      textLimit: "20mb",
      formidable: {
        maxFileSize: 20 * 1024 * 1024,
      },
    },
  },
//...

My server is configured with
Nginx Proxy + PM2

1 Like