base64 image encoder code example
Example: converting image to base64 string
router.post('/upload',function(req,res){
var base64ToBuffer = new Buffer(req.image, 'base64');//Convert to base64
//Write your insertcode of MongoDb
res.end("Image uploaded Successfully");
});