Blob
A Blob
encapsulates immutable, raw data that can be safely shared across
multiple worker threads.
Since
v15.7.0, v14.18.0
Properties
size
numberRequiredThe total size of the
Blob
in bytes.type
stringRequiredThe content-type of the
Blob
.Methods
arrayBuffer
Returns a promise that fulfills with an ArrayBuffer containing a copy of
the Blob
data.
Returns
Promise
Promise<ArrayBuffer>RequiredSince
v15.7.0, v14.18.0
slice
Creates and returns a new Blob
containing a subset of this Blob
objects
data. The original Blob
is not altered.
Parameters
start
numberThe starting index.
end
numberThe ending index.
type
stringThe content-type for the new
Blob
Returns
Since
v15.7.0, v14.18.0
stream
Returns a new ReadableStream
that allows the content of the Blob
to be read.
Returns
Since
v16.7.0
text
Returns a promise that fulfills with the contents of the Blob
decoded as a
UTF-8 string.
Returns
Promise
Promise<string>RequiredSince
v15.7.0, v14.18.0
Was this section helpful?