Syntax
- reader = new FileReader();
Parameters
Property/Method | Description |
---|
error | A error that occurred while reading the file. |
readyState | Contains the current state of the FileReader. |
result | Contains the file contents. |
onabort | Triggered when the operation is aborted. |
onerror | Triggered when an error is encountered. |
onload | Triggered when the file has loaded. |
onloadstart | Triggered when the file loading operation has started. |
onloadend | Triggered when the file loading operation has ended. |
onprogress | Triggered whilst reading a Blob. |
abort() | Aborts the current operation. |
readAsArrayBuffer(blob) | Starts reading the file as an ArrayBuffer. |
readAsDataURL(blob) | Starts reading the file as a data url/uri. |
readAsText(blob[, encoding]) | Starts reading the file as a text file. Not able to read binary files. Use readAsArrayBuffer instead. |