FileReader
The FileReader
interface 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.
Properties
The error
read-only property of the FileReader interface returns the error that occurred while reading the file.
The readyState
read-only property of the FileReader interface provides the current state of the reading operation.
Functions
The readAsArrayBuffer()
method of the FileReader interface is used to start reading the contents of a specified Blob or File.
The readAsDataURL()
method of the FileReader interface is used to read the contents of the specified file's data as a base64 encoded string.
The readAsText()
method of the FileReader interface is used to read the contents of the specified Blob or File.