Skip to content

Instantly share code, notes, and snippets.

@y2468101216
Created December 4, 2015 08:53
Show Gist options
  • Save y2468101216/bc55984ebd0c7dc86667 to your computer and use it in GitHub Desktop.
Save y2468101216/bc55984ebd0c7dc86667 to your computer and use it in GitHub Desktop.
app.post('/img',function(req, res){
var decodedImage = new Buffer(req.body.base64Image, 'base64');
fs.writeFile('image_decoded.jpg', decodedImage, function(err) {
if(err) throw err;
res.send('success');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment