title: Sending binary file from Node/express server
body: <p>I have a png that is encrypted with openssl to a binary file. I am using Multer to post the file to my api and am able to receive and save it in the filesystem. I would now like to respond to a get request with the binary file. So far I have the following, and I receive some binary data; however I receive about twice as much data as I expect and I can see that the bytes are different from the file that is sitting on the server. Any help regarding how to send a binary file as is to a client would be much appreciated.</p>
  <pre class="lang-js prettyprint-override"><code>app.get(&quot;/api/image/:filename&quot;, async (req, res) =&gt; {
    const { filename } = req.params;
    const filePath = path.join(__dirname, &quot;..&quot;, &quot;uploads&quot;, filename);
    res.sendFile(filePath);
  });
  </code></pre>