title: File data from input element
body: <p>In Firefox 3 it is possible to access the contents of a <code>&lt;input type="file"&gt;</code> element as in the following.</p>
  
  <p>Assume a form with the following element:</p>
  
  <pre><code>&lt;input type="file" id="myinput"&gt;
  </code></pre>
  
  <p>Now the data of the file selected can be accessed with:</p>
  
  <pre><code>// Get the file's data as a data: URL
  document.getElementById('myinput').files[0].getAsDataURL()
  </code></pre>
  
  <p><strong>Is there a cross-browser way to accomplish the same thing?</strong></p>
  
  <p>Firefox documentation for this feature:</p>
  
  <ul>
  <li><a href="https://developer.mozilla.org/en/nsIDOMFileList" rel="noreferrer">https://developer.mozilla.org/en/nsIDOMFileList</a></li>
  <li><a href="https://developer.mozilla.org/en/nsIDOMFile" rel="noreferrer">https://developer.mozilla.org/en/nsIDOMFile</a></li>
  </ul>