Skip to content

Instantly share code, notes, and snippets.

@milovanderlinden
Created August 30, 2012 08:01
Show Gist options
  • Save milovanderlinden/3523940 to your computer and use it in GitHub Desktop.
Save milovanderlinden/3523940 to your computer and use it in GitHub Desktop.
function getTempImg(base64Image,filename){
var decodedImage = new Buffer(base64Image, 'base64');
fs.writeFile('cache/' + filename + '.jpg', decodedImage, function(err, data) {
console.log(data);
if (err){
return err;
} else {
return 'cache/' + filename + '.jpg';
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment