Alright, so I have an image at a specific URL with the variable path, I want to download it and store it in CollectionFS. How can I get/create the image buffer from the response?
var request = Npm.require('request').defaults({encoding: null});
request.get(path, function(err, res, body)
{
return CollectionFS.storeBuffer(res.request.uri.path, body, {
});
});
It appears to store successfully, with the correct size. But when I try to view the image it appears to be corrupted.