JavaScript HTML5 FileReader: Read files user selected with the FileReader API

Recommend this page to a friend!
  Info   View files Example   Demos   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 52%Total: 240 All time: 199 This week: 4Up
Version License JavaScript version Categories
filereader 1.0.0MIT/X Consortium ...1.0HTML, Files and Folders
Description Author

This object can read files user selected with the FileReader API.

It creates an invisible file form input on the page to let the user select one or more local files.

The object uses the HTML5 FileReader API to retrieve the contents of the files the user picked.

A given callback function when each of the selected files is loaded.

Innovation Award
JavaScript Programming Innovation award nominee
March 2015
Number 2

Prize: One downloadable e-book of choice by O'Reilly
In the past, JavaScript code on a Web page could not access files on the user computer due to security reasons. So applications required the user to select and upload their files to the server to access their contents.

Nowadays, it is possible to access files selected by the user from his computer without having to upload them to the server, using this HTML5 FileReader API.

This object takes advantage of this API to access the files of the user computer without depending on a server to upload the files.

Manuel Lemos
Picture of Andras Toth
  Performance   Level  
Name: Andras Toth <contact>
Classes: 22 packages by
Country: Hungary Hungary
Age: 49
All time rank: 31 in Hungary Hungary
Week rank: 1 Up
Innovation award
Innovation award
Nominee: 15x

Winner: 9x

  Files folder image Files  
File Role Description
Plain text file filereader.js Class html5 filereader
Accessible without login Plain text file index.html Example demo

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:199
This week:4Up
User Ratings User Comments (2)
 All time