title: Stream files in node/express to client
body: <p>I want to stream content to clients which is possibly stored in db, which they would save as files.</p>
  
  <p>Obviously res.download would do the job nicely, but none of the response.* functions accept a stream, only file paths.</p>
  
  <p>I had a look at res.download impl and it just sets Content-Disposition header and then a sendfile.</p>
  
  <p>So I could achieve this using this post as a guide.
  <a href="https://stackoverflow.com/questions/8257544/node-js-pipe-stream-to-response-freezes-over-https">Node.js: pipe stream to response freezes over HTTPS</a></p>
  
  <p>But it seems I would miss out on all the wrapping aspects that res.send performs.</p>
  
  <p>Am I missing something here or should I just do the pipe and not worry about it - what is best practice here?</p>
  
  <p>Currently creating temp files so I can just use res.download for now.</p>