Interface FileReader

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.

MDN Reference

Hierarchy

Properties

DONE: 2
EMPTY: 0
LOADING: 1
onabort: ((this, ev) => any)

Type declaration

onerror: ((this, ev) => any)

Type declaration

onload: ((this, ev) => any)

Type declaration

onloadend: ((this, ev) => any)

Type declaration

onloadstart: ((this, ev) => any)

Type declaration

onprogress: ((this, ev) => any)

Type declaration

readyState: 0 | 2 | 1
result: string | ArrayBuffer

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Parameters

    • blob: Blob
    • Optional encoding: string

    Returns void