title: Upload raw file with vue.js, node.js and express.js
body: <p>Please tell me how I can upload a file to express.js server witch use <code>bodyparser.raw()</code></p>
  
  <ul>
  <li>client side</li>
  </ul>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type='file' @change='onFilePicked' /&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// ...
  onFilePicked(file) {
    const url = 'upload/api/url';
    let fd = new FormData();
    fd.append('upload', file);
    fd.append('key', 'somestring');
    axios.post(url,fd).then( res =&gt; { console.log(res); }, err =&gt; { console.log(err); });
  }
  // ...
  </code></pre>
  
  <ul>
  <li>server side</li>
  </ul>
  
  <pre class="lang-js prettyprint-override"><code>const app = express();
  app.use(bodyParser.raw());
  
  app.post('upload/api/url', (res, req) =&gt; {
    console.log(req.req.key); //undefined
    console.log(req.req.upload); //undefined
  
    res.res.status(500).send("WIP");
  });
  </code></pre>
  
  <p>I have to use <code>bodyparser.raw()</code>. Maybe can I pul <code>form data</code> as value into json object?</p>
  
  <p>I can not read file content inside <code>app.post('upload/api/url', ... );</code>.</p>