Answers for "convert base64 to image nodejs"

0

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);
});
Posted by: Guest on July-12-2021
-1

nodejs read image as base64

const fs = require('fs');
const contents = fs.readFileSync('/path/to/file.jpg', {encoding: 'base64'});
Posted by: Guest on May-06-2021

Code answers related to "convert base64 to image nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language