app.use(express.urlencoded({ extended: true }));
routes.post(
'',
async (req, res, next) => next(req.body.some_params ? null : new Error('MISSING_PARAMS')),
multer({ dest: './uploads' }).single('file'),
(req, res) => res.json({ status: true })
);
This does not handle multipart bodies, due to their complex and typically large nature […]