Cross-browser solution to read a local file and return the Data URI in base64 [Javascript]

I searched for a solution to have a way to read a local file and then have the Base64 content returned into all the web browsers. The Javascript FileReader API exists for the modern browsers but not for Internet Explorer (IE). The solution is finally with Flash !

Look at the project on http://aymkdn.github.com/FileToDataURI/, and thanks to Country/FileToDataURI.as for the inspiration 🙂

2 avis sur “Cross-browser solution to read a local file and return the Data URI in base64 [Javascript]

  1. mac

    Do you have any working piece of code that uses FileToDataURI.swf?

    I’m having problems with running your code in this mode. What I basically need is to load local file from disk from html … in swf mode. Ideally without prompting user for selecting a file.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*