September 2013
Beginner to intermediate
480 pages
9h 59m
English
We have already used file input to read some of the data, but never went into details about file reading and the objects that are available to us. In this recipe, we will create a simple file reader using input file that will act as a mini demonstration of some of the options provided in the File API: Directories and System, http://www.w3.org/TR/file-system-api/.
We will create an HTML file containing a file input control and a progress output for the state of the upload:
<body> <p> <progress id="progress" value="0" max="100"></progress> <output id="percent" for="progress">0</output> </p> <p> <div id="fileInfo"></div> </p> <input type="file" id="file" value="Choose ...
Read now
Unlock full access