Menu
Choose a product
Viewing: v1.7.x (latest)
Find another version
Scroll for more
Open source
Blob
Blob is an interface that 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.
It’s the type of the data received on
WebSocket.onmessage when WebSocket.binaryType is set to "blob".
A Blob instance has the following methods/properties:
| Class/Property | Description |
|---|---|
| Blob.size | The number of bytes of data contained within the Blob. |
| Blob.type | A string containing the MIME type, or an empty string if the type could not be determined. |
| Blob.arrayBuffer() | Returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer. |
| Blob.bytes() | Returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes. |
| Blob.slice() | Returns a new Blob object which contains data from a subset of the blob on which it’s called. |
| Blob.stream() | Returns a
ReadableStream which upon reading returns the data contained within the Blob. |
| Blob.text() | Returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8. |
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video

Performance testing and observability in Grafana Cloud
Optimize user experiences with Grafana Cloud. Learn real-time insights, performance testing with k6, and continuous validation with Synthetic Monitoring.
Events

User-centered observability: load testing, real user monitoring, and synthetics
Learn how to use load testing, synthetic monitoring, and real user monitoring (RUM) to understand end users' experience of your apps. Watch on demand.