Blob API
chevron down
 

Blob API

Class: Blob

A Blob object represents a file-like object of immutable, raw data. https://developer.mozilla.org/en-US/docs/Web/API/Blob

Properties

readonly size

number

The size, in bytes, of the data contained in the Blob object.

readonly type

string

A string indicating the MIME type of the data contained in the Blob. If the type is unknown, this string is empty.

Methods

slice()

slice(start?: number | undefined, end?: number | undefined, contentType?: string | undefined)

Returns: Blob

Returns a new Blob object containing the data in the specified range of bytes of the source Blob.

Parameter: contentType The content type to assign to the new Blob; this will be the value of its type property. The default value is an empty string.

BlobPart

String: string | ArrayBuffer | ArrayBufferView

A type used to initialize a Blob.

Interface: BlobPropertyBag

An options interface available for Blob constructor.

Properties

type

string or undefined

Represents the MIME type of the content of the array that will be put in the blob. Has a default value of "".