Hi im having this problem with my nextjs app.
I have an api route thas use the multer middleware, for that to work i have to tell next to disable the bodyparser for that route.
In the fronted the from has a field for a file and other text fields.
If i upload a file then i get all the data, the file and the text fields in the req.body.
But if i dont upload a file then the text fields are not populated.
Hi im having this problem with my nextjs app. I have an api route thas use the multer middleware, for that to work i have to tell next to disable the bodyparser for that route. In the fronted the from has a field for a file and other text fields. If i upload a file then i get all the data, the file and the text fields in the req.body. But if i dont upload a file then the text fields are not populated.
uploadRoute('imageFile', async (req, res) => {
console.info('REQ', req);
and that uploadRoute middleware im using is here: