I\'m trying to write a canvas data with node.js fs.writeFile as a binary. JPEG file, but after the file is written I can see that the file is stored as plain text, not binar
I have had the question in question. I solved the problem when I made the default value null of "encoding" in the "request" library
var request = require("request").defaults({ encoding: null }); var fs = require("fs"); fs.writeFile("./image.png", body, function(err) { if (err) throw err; });