Field value too long

var formData = new FormData();
formData.append('text', myData);
'myData' content is rich text data (text + image in base64) around 15mb is encoded as multipart
Increase the field data limit using the limits option:
multer({
limits: { fieldSize: 25 * 1024 * 1024 }
})
If anyone arrives here after seeing this error and wonders how to intercept it http://expressjs.com/en/guide/error-handling.html states to use:
app.use(function (err, req, res, next) {
console.error(err.stack)
res.status(500).send('Something broke!')
})
Increase the field data limit using the
limitsoption:multer({ limits: { fieldSize: 25 * 1024 * 1024 } })
where does this go?
where does this go?
@creightontaylor
When you initialize Multer upload function
var upload = multer({ storage: storage,limits:{fieldSize: 25 * 1024 * 1024} });
What is the difference between fieldSize and fileSize?
¿ Cuál es la diferencia entre
fieldSizeyfileSize?
fields seria para campo y el file para archivos bro
Increase the field data limit using the
limitsoption:multer({ limits: { fieldSize: 25 * 1024 * 1024 } })
This works. The default upload limit in multer is around 1 MB. So if you want to send more data you have to increase the limits. 25 * 1024 * 1024 (in bytes) will give you around 25 MB.