I tried to upload image files to the serve with the help of connect-multiparty
router.post('/image', multipartMiddleware , function(req, res) {
console.log(req.body, req.file);
});
<form method="post" action="/products/image">
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
But the result of the above console is { file: '156.jpg' } undefined
, i.e. I can get the file name, but why the file object is not coming?