I (as the client) am trying to post an image with restify, and the server just needs to save it.
req.pipe(fs.createWriteStream('test.jpg'));
is not working. An empty file is created but nothing more. It works when I copy req.body
into a buffer and then fs.writeFile(...)
. I have also tried req.body.pipe
, but this throws an error.