title: Filereader not working in chrome
body: <p>I'm uploading image files from my PC. Then I use filereader to read the files and preview the uploaded image. In firefox it is working fine. But in chrome, everything works but output of reader.readAsDataURL(); comes empty in chrome. </p>
  
  <p>Here is my code,</p>
  
  <pre><code>&lt;body&gt;
     &lt;form name="Upload" enctype="multipart/form-data" method="post"&gt;
         Filename: &lt;INPUT type="file" id="submit"&gt;
         &lt;INPUT type="button" id="send" value="Upload"&gt;
     &lt;/form&gt;
     &lt;div 
         id="div" 
         align="center" 
         style="height: 200px;width: 500px;border-style: ridge;border-color: red"&gt;
     &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;script type="text/javascript"&gt;
      document.getElementById('send').onclick=function()
      {
          var imag = document.createElement("img");
          var thumbnail = document.getElementById("div");
          if(document.all) {
          imag.src = document.getElementById('submit').value;
          }
          else {
          function handlefilereader(evt){
          var target = evt.target || evt.srcElement;
          imag.src = evt.target.result; 
          }
  
          var reader = new FileReader()
          reader.onload = handlefilereader;
          reader.readAsDataURL(document.getElementById('submit').files[0]);   
          }
          thumbnail.appendChild(imag);
      }
  &lt;/script&gt;
  </code></pre>
  
  <p></p>