Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

Index

Properties

Readonly DONE

DONE: number

Readonly EMPTY

EMPTY: number

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

Readonly LOADING

LOADING: number

Readonly error

error: DOMException | null

onabort

onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null

onerror

onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null

onload

onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null

onloadend

onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null

onloadstart

onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null

onprogress

onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null

Readonly readyState

readyState: number

Readonly result

result: string | ArrayBuffer | null

Methods

abort

  • abort(): void
  • Returns void

addEventListener

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • 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.

    Parameters

    Returns boolean

readAsArrayBuffer

  • readAsArrayBuffer(blob: Blob): void
  • Parameters

    Returns void

readAsBinaryString

  • readAsBinaryString(blob: Blob): void
  • Parameters

    Returns void

readAsDataURL

  • readAsDataURL(blob: Blob): void
  • Parameters

    Returns void

readAsText

  • readAsText(blob: Blob, encoding?: string): void
  • Parameters

    • blob: Blob
    • Optional encoding: string

    Returns void

removeEventListener

Generated using TypeDoc