Interface Blob

interface Blob {
    size: number;
    type: string;
    arrayBuffer(): Promise<ArrayBuffer>;
    slice(start?, end?, type?): Blob;
    stream(): ReadableStream<any>;
    text(): Promise<string>;
}

Hierarchy (view full)

Properties

Methods

Properties

size: number

The total size of the Blob in bytes.

Since

v15.7.0, v14.18.0

type: string

The content-type of the Blob.

Since

v15.7.0, v14.18.0

Methods

  • Returns a promise that fulfills with an ArrayBuffer containing a copy of the Blob data.

    Returns Promise<ArrayBuffer>

    Since

    v15.7.0, v14.18.0

  • Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered.

    Parameters

    • Optional start: number

      The starting index.

    • Optional end: number

      The ending index.

    • Optional type: string

      The content-type for the new Blob

    Returns Blob

    Since

    v15.7.0, v14.18.0

  • Returns a new ReadableStream that allows the content of the Blob to be read.

    Returns ReadableStream<any>

    Since

    v16.7.0

  • Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string.

    Returns Promise<string>

    Since

    v15.7.0, v14.18.0

Generated using TypeDoc