title: Sending pdf files to user from nodejs to reactjs
body: <p>I have pdf documents stored in the file system on the server side.</p>
  
  <p>I need to let the user download one of them when he/she clicks on download.</p>
  
  <p>The problem is that I know how to send a file from NodeJS to browser but here the request will be made by a ReactJS axios request. So when I send a file, the response will go to react. How do I send that pdf file to the user? Do I access the file system directly using my front end code?</p>
  
  <p>I get the following in the browser console when I log the response after I do <code>res.sendFile(file_path)</code> in NodeJS</p>
  
  <p><a href="https://i.stack.imgur.com/8ESIc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ESIc.png" alt="enter image description here"></a></p>
  
  <p>How do I process this so that I can make the user download the pdf?</p>