Skip to content Skip to sidebar Skip to footer

Syntax Issue With Using Multer In Node.js

i've been using this tutorial : https://medium.com/@mahesh_joshi/reactjs-nodejs-upload-image-how-to-upload-image-using-reactjs-and-nodejs-multer-918dc66d304c To upload a file from

Solution 1:

It should be like this

router.post('/upload', function (req, res) {
    upload(req, res, function (err) {
        console.log("Request ---", req.body);
        console.log("Request file ---", req.file);//Here you get file.
        /*Now do where ever you want to do*/
        if(!err) {
            return res.send(200).end();
        }
    })
})

Post a Comment for "Syntax Issue With Using Multer In Node.js"