title: Nodejs Express get raw content of user uploaded file
body: <p>Is it possible to get the raw file contents from a user uploaded file in Nodejs Express?</p>
  <pre><code>app.post('/images', upload.single('image'), async (req, res) =&gt; {
    const file = req.file
    ...
  </code></pre>
  <p>I realised that the <code>file</code> variable in this case is of the type <code>object</code> and I am struggling to get the raw data that is inside of it.</p>
  <p>More specifically, those files in my case will only be SVG, and I would like to reference some certain tags and data in those files. I have searched around a lot for a solution to this problem, thanks.</p>
  <p><strong>Edit: added form</strong></p>
  <pre><code>&lt;form onSubmit={submit}&gt;
      &lt;input onChange={fileSelected} type=&quot;file&quot; accept=&quot;.svg&quot;&gt;&lt;/input&gt;
      &lt;input value={description} onChange={e =&gt; setDescription(e.target.value)} type=&quot;text&quot;&gt;&lt;/input&gt;
      &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>