Blob API
chevron down

Blob API

Class: Blob

A Blob object represents a file-like object of immutable, raw data.


readonly size


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

readonly type


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



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.


String: string | ArrayBuffer | ArrayBufferView

A type used to initialize a Blob.

Interface: BlobPropertyBag

An options interface available for Blob constructor.



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 "".