Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert base64 to image nodejs

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

require("fs").writeFile("out.png", base64Data, 'base64', function(err) {
  console.log(err);
});
 
PREVIOUS NEXT
Tagged: #convert #image #nodejs
ADD COMMENT
Topic
Name
4+3 =