So, I have a simple controller with method upload:
upload: function (req, res) {
req.file('fileName').upload(function (err, uploadedFile) {
res.json({err: err, uploadedFile: uploadedFile});
});
}
Everything works perfect, until I send file with which is not handled with req.file method. So for example if I send file with name 'someOtherFileName' and inside controller I expect 'fileName' skipper will hang and eventually (after like 2 minutes) break.
How can sails ignore files inside req that are not needed? Or at least, can I respond with error message like 'please use fileName as file param name'...