JavaScript edit

File API, blobs and FileReaders

Syntax

Parameters

Property/MethodDescription
errorA error that occurred while reading the file.
readyStateContains the current state of the FileReader.
resultContains the file contents.
onabortTriggered when the operation is aborted.
onerrorTriggered when an error is encountered.
onloadTriggered when the file has loaded.
onloadstartTriggered when the file loading operation has started.
onloadendTriggered when the file loading operation has ended.
onprogressTriggered 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.

Remarks

https://www.w3.org/TR/FileAPI/

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Table Of Contents
17 Map
18 Set
28 Date
31 AJAX
42 JSON
64 File API, blobs and FileReaders
104 Tilde
107 Events
  ↑ ↓ to navigate     ↵ to select     Esc to close