req.body not working when using multipart/form-data in html form NodeJs/Express
问题 I am using body-parser to get info requested from forms, but when I put enctype="multipart/form-data" in the header of the form, the req.body will not working at all. However, I have used multer lib in order to upload images as follow: app.post("/", function (req, res, next) { var button = req.body.button_name; if (button == "upload") { var UserId = 2; var imageUploadedLimited = 3; var storage = multer.diskStorage({ destination: function (req, file, callback) { var dir = "./public/images