Skip to main content

File

File and data manipulation tools. Handle files, read data and work with binary content.

Eg File, Blob

Interfaces

I
v
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.

I
BlobPropertyBag
No documentation available
I
v
File

Provides information about files and allows JavaScript in a web page to access their content.

I
FilePropertyBag
No documentation available
I
v
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.

Type Aliases

T
BlobPart
No documentation available
    T
    EndingType
    No documentation available

      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 #

      #size: number
      readonly
      #type: string
      readonly

      Methods #

      #arrayBuffer(): Promise<ArrayBuffer>
      #bytes(): Promise<Uint8Array<ArrayBuffer>>
      #slice(
      start?: number,
      end?: number,
      contentType?: string,
      ): Blob
      #text(): Promise<string>

      variable 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 #

      #prototype: Blob
      readonly


      interface File

      extends Blob

      Provides information about files and allows JavaScript in a web page to access their content.

      Properties #

      #lastModified: number
      readonly
      #name: string
      readonly
      #webkitRelativePath: string
      readonly

      variable File

      Provides information about files and allows JavaScript in a web page to access their content.

      Properties #

      #prototype: File
      readonly


      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

      variable FileReader

      The constructor object for FileReader, used to create a reader that asynchronously reads the contents of a Blob or File into memory.

      Properties #

      #EMPTY: 0
      readonly
      #LOADING: 1
      readonly
      #DONE: 2
      readonly



      type alias EndingType

      Definition #

      "transparent" | "native"

      Did you find what you needed?

      Privacy policy