Skip to content

Blob

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1023

The Blob interface represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data.

MDN Reference

new Blob(type?, options?): Blob

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1024

(string | ArrayBuffer | Blob | ArrayBufferView<ArrayBufferLike>)[]

BlobOptions

Blob

readonly size: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1033

The size read-only property of the Blob interface returns the size of the Blob or File in bytes.

MDN Reference


readonly type: string

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1039

The type read-only property of the Blob interface returns the MIME type of the file.

MDN Reference

arrayBuffer(): Promise<ArrayBuffer>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1051

The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.

MDN Reference

Promise<ArrayBuffer>


bytes(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1057

The bytes() method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.

MDN Reference

Promise<Uint8Array<ArrayBufferLike>>


slice(start?, end?, type?): Blob

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1045

The slice() method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it’s called.

MDN Reference

number

number

string

Blob


stream(): ReadableStream

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1069

The stream() method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.

MDN Reference

ReadableStream


text(): Promise<string>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1063

The text() method of the string containing the contents of the blob, interpreted as UTF-8.

MDN Reference

Promise<string>