HTML and CSS Reference
Table B.31. FileList API
Number of files in the list.
Gets the file at the given index (zero-based).
Table B.32 lists attributes and methods associated with the FileReader object. A
File-Reader object lets web applications asynchronously read the contents of files (or
raw data buffers) stored on the user's computer, using File or Blob objects to specify the
file or data to read.
Table B.32. FileReader API
Aborts reading the file
Reads the contents of the blob (which is either a File or a Blob object) into an array buf-
Reads the contents of a Blob or File object and returns a data: URL to it.
Reads the contents of a Blob or File object into a text string if the optional encoding para-
meter is specified (e.g., 'ISO-8859-1' or 'UTF-8'); then the string will be encoded using
that character set.
If an error occurs, it will be loaded into this property.
The state of the file read operation (0 = EMPTY, 1 = LOADING, 2 = DONE).
This will be populated with the file's contents when a read operation has been completed.
The format of the result will depend on the method used to read the file.
Table B.33 lists events associated with the FileReader object.
Table B.33. FileReader events
Fires when the read operation is aborted.
Fires when an error occurs while reading the file.
Fires when the read operation has successfully completed.
Fires after onload or onerror, regardless of whether the operation was successful.
Fires when the read operation is about to start.
Fires periodically during the read operation.