Sails.js with skipper: check if file input were empty before starting upload
问题 I'm using Sails 11.1 and skipper 0.5.5. I have a form to create an article in my app. An image can be attached to an article, so there is an input file. I would like to check, server-side, if this input file was empty, before trying to start upload. Is it possible, and if yes, how can I do this? I tried to check req.files , or req.files.photo ("photo" is the input name) and req.body.photo , but they are always undefined, even if there is a file. req.file('photo') is always defined, so I can't