I use this on Windows and it has no problem.
upload : function (req, res) {
req.file('avatar').upload({
maxBytes: 10000000
}, function whenDone(err, uploadedFiles) {
if (err) {
return res.negotiate(err);
}
var avatarFd = uploadedFiles[0].fd;
res.ok(avatarFd);
});
},
download: function (req, res) {
var location = req.param('fd');
var SkipperDisk = require('skipper-disk');
var fileAdapter = SkipperDisk();
fileAdapter.read(location).on('error', function (err) {
return res.serverError(err);
}).pipe(res);
}
First download it using /somecontroller/uploadwith multipart/form-data, it will return the location fd. And download it using this URL
http://localhost:1337/somecontroller/download?fd=[fd-from-upload-return]
The controller name and host name depend on the configuration of your application.
fd , prodtion , , .tmp/uploads/.