title: javascript creating a file from URL
body: <p>I'm using a 3rd party library which wants to load in a file via the HTML file system, as in:</p>
  
  <pre><code>&lt;input id="fileupload" type="file" onchange="LoadAndDisplayFile(this.files[0])"&gt;
  </code></pre>
  
  <p>This works great, except I'd like to pass in a url to a file stored on the serverr rather than have the user upload a file.</p>
  
  <p>I tried using:</p>
  
  <pre><code>var myFile = new File ("path/to/file");
  </code></pre>
  
  <p>with the hope that I'd then be able to pass <code>myFile</code> into <code>LoadAndDisplayFile()</code>
  but I get the following error:</p>
  
  <p>Uncaught TypeError: Failed to construct 'File': 2 arguments required, but only 1 present.</p>
  
  <p>I'm sure this is a noob question, but what am I missing here?</p>