IE-9 giving fakepath when using input type file : <p>I wasn't able to read the file in IE-9. I am generating base64 from the url. In all the other browsers it works, except for IE-9. Can anyone please help me with this?
 I am getting c://fakepath/images.jpg in IE-9</p>

<pre><code>if((navigator.userAgent.indexOf("MSIE") != -1 ) ||  !!document.documentMode == true )) //IF IE &gt; 10
      {
      tmppath = $("#hi").val();
      console.log("only in ie"+tmppath);
      }
else{
    var selectedFile = this.files[0];
tmppath = URL.createObjectURL(event.target.files[0]);
console.log("temp path other"+tmppath);
}

console.log("temp path"+tmppath);
&lt;input name="hello1" type="file" id="hi" accept="image/*"/&gt;
</code></pre>
