Express: PayloadTooLargeError

Viewed 15

I'm having an issue where the payload is larger than the 100kb default limit in express.

Here's the payload:

CoverData: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAA (Show More 961kb)"
Series: ""
Title: "Book Title Here"
UserKey: "bb0123e2-a19f-408c-9cde-10dc9ca7e4b8"

First of all, I've tried the suggestions in some of the other similarly asked questions here. None of the suggestions or the accepted answer work. Not surprising since they are from 2016.

Here's what I'm doing: enter image description here

You can see on line 29 to 32 I'm setting the limit to 50mb which should resolve the issue. I also tried:

  1. Tried bodyParser. No difference.
  2. Tried adding parameterLimit: 5000 to urlencoded. No difference. I only have 4 parameters.
0 Answers
Related