title: Assistance with downloading a file on my localhost application
body: <p>I have a reactjs web app. On one of the pages, I want a user to click on a download button and then be able to download a pdf file that I have in my <code>assets</code>folder. I seem to be having some problems trying to do this. Here is what I've tried.</p>
  
  <p>For reference, I have tried the solution proposed in this <a href="https://stackoverflow.com/questions/11620698/how-to-trigger-a-file-download-when-clicking-an-html-button-or-javascript">question</a></p>
  
  <p>The answer states to do this:</p>
  
  <pre><code>&lt;a href="path_to_file" download="proposed_file_name"&gt;Download&lt;/a&gt;
  </code></pre>
  
  <p>So for my first attempt I have a button that looks like this:</p>
  
  <pre><code>&lt;a href="../assets/resume.pdf" download="Resume"&gt;Download&lt;/a&gt;
  </code></pre>
  
  <p>The error I receive on my browser is <code>Failed- No file</code>. I figured that my path was wrong so I've tried many variations even an absolute path and the result is the same. The file cannot be found.</p>
  
  <p>In the second attempt I found this other stack overflow <a href="https://stackoverflow.com/questions/18246053/how-can-i-create-a-link-to-a-local-file-on-a-locally-run-web-page/18246357">question</a></p>
  
  <p>This question's answer declares this answer:</p>
  
  <pre><code>&lt;a href="file:///C:\Programs\sort.mw"&gt;Link 1&lt;/a&gt;
  </code></pre>
  
  <p>When I try to implement the second answer with my own directory paths, I receive a <code>Failed - Network error</code> problem. Is there something I'm missing.</p>
  
  <p>A long time ago, I was able to host the file online but it seems like it should be an easy thing to do to have the file in your directory system the way images and stylesheets are. Am I missing something here? Help would be appreciated.</p>
  
  <p>------EDIT-----</p>
  
  <p>The file structure looks like this:</p>
  
  <pre><code>react-site
    -- node_modules
    -- package.json
    -- index.html
    -- resume.pdf
    -- README.md
    -- src
       |
       | -- a bunch of files
       | -- assets
       |     
       | -- modules
            |
             - skill.js * This is where I reference the download
  </code></pre>
  
  <p>------- EDIT #2 ------</p>
  
  <p>skills.js:</p>
  
  <pre><code>40   class Skills extends Component {
   41   render() {
   42     return (
   43       &lt;div&gt;
   44         &lt;ReactHighcharts config={highchartConfig} domProps={{id: 'chartId'}}&gt;&lt;/ReactHighcharts&gt;
   45         &lt;div&gt;
   46           &lt;a href="resume.pdf" download="Resume"&gt;Download&lt;/a&gt;
   47           &lt;RaisedButton label="Download Resume" primary={true}/&gt;
   48         &lt;/div&gt;
   49       &lt;/div&gt;
   50     );
   51   }
   52 }
   53
   54 export { Skills };
  </code></pre>