filereader.js – A Lightweight FileReader Wrapper
filereader.js is a wrapper for accessing this functionality. It can be called using:
FileReaderJS.setupInput(fileInput, opts); FileReaderJS.setupDrop(dropbox, opts);
If you use jQuery, you can access these calls with:
To see the full range of options and functionality, view the readme.
You can see an example project using filereader.js on Instant Sprite, a browser based CSS Sprite Generator that I am working on. Try dragging images onto the body, or clicking to add multiple image files to see what is possible.