title: Convert URL to File or Blob for FileReader.readAsDataURL
body: <p>Reference: <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader.readAsDataURL" rel="noreferrer">FileReader.readAsDataURL</a></p>
  
  <p>Considering the following example:</p>
  
  <pre><code>function previewFile(file) {
  
    var reader  = new FileReader();
  
    reader.onloadend = function () {
      console.log(reader.result);
    }
    reader.readAsDataURL(file);
  }
  </code></pre>
  
  <p>It states:</p>
  
  <blockquote>
    <p>instanceOfFileReader.readAsDataURL(blob);</p>
    
    <p>blob: The Blob or File from which to read.</p>
  </blockquote>
  
  <ol>
  <li><p>How can a local file URL like: <code>'file:///C:/path-to/root.png'</code> be
  passed to the <code>readAsDataURL()</code>   </p></li>
  <li><p>Is <code>FileReader()</code> available in a Firefox Addon?</p></li>
  </ol>