FileReader or alternative to IE9

1

The FileReader object allows web applications to read asynchronously the contents of the files (or pure data buffers) of the user's computer. The following supported browsers are:

Firefox (Gecko) - 3.6 (1.9.2) 
Chrome - 7 
Internet Explorer - 10     
Opera - 12.02
Safari - 6.0.2

I'm developing an import where I read a file and convert it into base64 so that IE10 works perfectly, I need the same solution for IE9.

    
asked by anonymous 15.02.2016 / 13:13

3 answers

2

You can check if FileReader is enabled for the browser and if you are not using an alternative option:

if ('FileReader' in window) {
  // Faça algo se FireReader for suportado
} else {
  // Faça algo caso o FireReader não for suportado.
}

Possible solution compatible with IE8 > FileReader    Remember, this solution uses jQuery and Flash.

Reference: How to get Cross Browser Compatibilty for window.fileReader API of HTML5

    
15.02.2016 / 13:25
2

According to the MDN documentation from the API File is supported by the following browsers:

  • Chrome version 13
  • Firefox (Gecko) version 3.0 (1.9)
  • Internet Explorer version 10.0
  • Opera version 11.5 (Presto)
  • Safari (WebKit) version 6.0

Then natively you will not be able to solve this, as it is a limitation (not yet implemented), however there are fallbacks , for example in Flash.

  Many people are saying Flash will die or died, okay I agree, but this is a case of disuse and not that it really died, even in Desktops you can use it as fallback for various things

An example of great alternatives:

See Polyfills in the Modernizr repository:

15.02.2016 / 18:37
1

First I would like to remind you of the greatest achievement in the last few years:

Internet Explorer End of Support

So why do you support a browser that is no longer supported by the manufacturer?

In any case, you can use a Polyfill for the File API:

15.02.2016 / 13:21