Skip to main content

interface FileReader

extends EventTarget

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 #

#error: DOMException | null
readonly
#onabort: (() => any) | null
#onerror: (() => any) | null
#onload: (() => any) | null
#onloadend: (() => any) | null
#onloadstart: (() => any) | null
#onprogress: (() => any) | null
#result:
string
| ArrayBuffer
| null
readonly
#EMPTY: 0
readonly
#LOADING: 1
readonly
#DONE: 2
readonly

Methods #

#abort(): void
#readAsArrayBuffer(blob: Blob): void
#readAsBinaryString(blob: Blob): void
deprecated
#readAsDataURL(blob: Blob): void
#readAsText(
blob: Blob,
encoding?: string,
): void
#addEventListener<K extends keyof FileReaderEventMap>(
type: K,
listener: () => any,
options?: boolean | AddEventListenerOptions,
): void
#addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
#removeEventListener<K extends keyof FileReaderEventMap>(
type: K,
listener: () => any,
options?: boolean | EventListenerOptions,
): void
#removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void

你找到了你需要的东西吗?

隐私政策