title: Sails.JS file upload - can't get a file on req.file()
body: <p>I've just begun using Sails.JS and I tried to make a simple file upload. In Sails.JS, I've done this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>uploadFile: (req, res) =&gt; {
    req.file('avatar').upload({
     dirname: '../../assets/uploads'
    }, function (err, uploadedFiles){
     if (err) return res.serverError(err);
     return res.json({
      message: uploadedFiles.length + ' file(s) uploaded successfully!',
      files: uploadedFiles
     });
    });
   }</code></pre>
  </div>
  </div>
  </p>
  
  <p>For Postman, I've done this:
  <a href="https://i.stack.imgur.com/RN7kE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RN7kE.png" alt="upload file via postman"></a></p>
  
  <p>The problem is, after I upload a file via Postman, I don't get a file in req.file(). However, console.log(req) does show my uploaded file's binary (or something like that). I just can't figure out what happened.</p>