File
Interfaces
A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
Provides information about files and allows JavaScript in a web page to access their content.
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.
Type Aliases
interface Blob
A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
Properties #
Methods #
#arrayBuffer(): Promise<ArrayBuffer> #bytes(): Promise<Uint8Array<ArrayBuffer>> #stream(): ReadableStream<Uint8Array<ArrayBuffer>> #textStream(): ReadableStream<string> Returns a ReadableStream<string> that streams the blob's data decoded
as UTF-8 text.
interface BlobPropertyBag
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.
Properties #
#error: DOMException | null #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 #readyState: Methods #
#readAsArrayBuffer(blob: Blob): void #readAsBinaryString(blob: Blob): void #readAsDataURL(blob: Blob): void #readAsText(blob: Blob,encoding?: string,): 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 #removeEventListener<K extends keyof FileReaderEventMap>(type: K,listener: (this: FileReader,ev: FileReaderEventMap[K],) => any,options?: boolean | EventListenerOptions,): void #removeEventListener(): void variable FileReader
type alias EndingType
Definition #
"transparent" | "native"