Last active
October 28, 2024 21:06
-
-
Save Maqsim/857a14a4909607be13d6810540d1b04f to your computer and use it in GitHub Desktop.
HOW TO FIX "413 Payload too large" in NodeJS (Express)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
... | |
// Express 4.0 | |
app.use(bodyParser.json({ limit: '10mb' })); | |
app.use(bodyParser.urlencoded({ extended: true, limit: '10mb' })); | |
// Express 3.0 | |
app.use(express.json({ limit: '10mb' })); | |
app.use(express.urlencoded({ limit: '10mb' })); | |
... |
thank u it works properly
not work :(
error:
413: PAYLOAD_TOO_LARGE Code: FUNCTION_PAYLOAD_TOO_LARGE
this my code :
app.use(bodyParser.json({ limit: '100mb' })); app.use(bodyParser.urlencoded({ extended: true, limit: '100mb' })); app.use(express.json());
same issue, trouble me much, anyone know the reason about it?
goodd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why it's still says
payload is too large
??Note: I'm using Quill Rich Editor and uploading images.