Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
Https Request payload too large. Help me in understanding the concept

I am trying to send a base64 string of a file in an axios request body. The file size is arond 370KB.

I got request payload too large 413 error. After doing some research in internet learned that server is limiting the request size.

Till now my understanding is clear.

Now I changed it to formData and passing that form data as a request body. And I am not getting any 413 error. Server neatly provessed my request.

So what hapenned between formData and server?

Server is running on Nginx, Node, Express.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

By default axios sends data as JSON and on Node.js side JSON parser has a default limit of 100KB. So you can either continue to use formData or increase a limit in JSON parser options.

    app.use(json({
        limit: '20mb'
    }));

But if you intend to send large content often then consider using formData or even send content as binary.

Upd. For FormData if you usually will process it by multer you will have the following limits by default:

Field size: 1048576 bytes
File size: unlimited
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!