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.
interface FileReader extends EventTarget {
readonly DONE: number;
readonly EMPTY: number;
readonly error: DOMException | null;
readonly LOADING: number;
onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
readonly readyState: number;
readonly result: string | ArrayBuffer | null;
abort(): void;
addEventListener<K extends keyof FileReaderEventMap>(
type: K,
listener: (this: FileReader, ev: FileReaderEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;readAsArrayBuffer(blob: Blob): void;
readAsBinaryString(blob: Blob): void;
readAsDataURL(blob: Blob): void;
removeEventListener<K extends keyof FileReaderEventMap>(
type: K,
listener: (this: FileReader, ev: FileReaderEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
}type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;var FileReader: {
prototype: FileReader;
readonly DONE: number;
readonly EMPTY: number;
readonly LOADING: number;
new (): FileReader;
};§Extends
§Properties
§
readonly error: DOMException | null
[src]§
onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null
[src]§
onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null
[src]§
onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null
[src]§
onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null
[src]§
onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null
[src]§
onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null
[src]§Methods
§
addEventListener<K extends keyof FileReaderEventMap>(
[src]type: K,
listener: (this: FileReader, ev: FileReaderEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
removeEventListener<K extends keyof FileReaderEventMap>(
[src]type: K,
listener: (this: FileReader, ev: FileReaderEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void