Answers for "nodejs save blob file"

0

nodejs save blob file

var imageBuffer = request.file.buffer;
var imageName = 'public/images/map.png';

fs.createWriteStream(imageName).write(imageBuffer);
Posted by: Guest on October-08-2020
0

nodejs save blob file

var base64Data = req.body.image.replace(/^data:image\/png;base64,/, "");

require("fs").writeFile("out.png", base64Data, 'base64', function(err) {
  console.log(err);
});
Posted by: Guest on October-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language