title: REST post informations not received with multipart/form-data
body: <p>Using Restify &amp; Mongoose, I built a basic REST API. Everything is working fine as long as I send JSON content with <code>application/json</code> as a content.</p>
  
  <p>But now I need to send an image along with content, so I switched to <code>multipart/form-data</code> for a specific route. And it don't seem to get the content at all.</p>
  
  <p>Here’s the basic setup sent to my API with Insomnia: </p>
  
  <p><a href="https://i.stack.imgur.com/TNnka.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TNnka.jpg" alt="Content with insomnia"></a></p>
  
  <p>Pretty simple. The Mongodb Model only require <code>filename</code> and <code>url</code> at the moment (I’ll deal with the file itself once this will work).</p>
  
  <p>And this is what I get as a response from the server:</p>
  
  <pre><code>{
    "code": "Internal",
    "message": "Media validation failed: url: Path `url` is required., filename: Path `filename` is required."
  }
  </code></pre>
  
  <p>So it’s saying it didn't got any of the fields content.</p>
  
  <p>The Timeline shows that the fields have been sent:</p>
  
  <pre><code>&gt; POST /medias HTTP/1.1
  &gt; Host: localhost:3030
  &gt; User-Agent: insomnia/6.0.2
  &gt; Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY
  &gt; Accept: */*
  &gt; Content-Length: 221
  | --X-INSOMNIA-BOUNDARY
  | Content-Disposition: form-data; name="filename"
  | test.jpg
  | --X-INSOMNIA-BOUNDARY
  | Content-Disposition: form-data; name="url"
  | https://images.test.com/test.jpg
  | --X-INSOMNIA-BOUNDARY--
  * We are completely uploaded and fine
  &lt; HTTP/1.1 500 Internal Server Error
  &lt; Server: TestServer
  &lt; Content-Type: application/json
  &lt; Content-Length: 125
  &lt; Connection: Keep-Alive
  &lt; Content-MD5: KI89enLnYv9oMJxg5k4MXA==
  &lt; Date: Sun, 12 Aug 2018 22:50:31 GMT
  &lt; Request-Id: b20babc1-9f1b-466b-af7c-13d385cd8023
  &lt; Response-Time: 6
  * Received 125 B chunk
  * Connection #65 to host localhost left intact
  </code></pre>
  
  <p>Here’s my function:</p>
  
  <pre><code>server.post('/medias', (req, res, next) =&gt; {
    if (!req.is('multipart/form-data')) {
      return next(
        new errors.InvalidContentError(`Expects 'multipart/form-data'`)
      )
    }
  
    let data = req.body || {}
  
    let media = new Media(data)
    media.save((err) =&gt; {
      if (err) {
        return next(new errors.InternalError(err.message))
        next()
      }
  
      res.send(201)
      next()
    })
  })
  </code></pre>
  
  <p>A <code>console.log</code> on the <code>req.body</code> reveal that it’s empty. I’ve consoled the <code>req</code> itself to see if the datas could be stored anywhere else, but I couldn’t find anything.</p>
  
  <p>What did I missed here? Thank you in advance.</p>