17 lines
447 B
Plaintext
17 lines
447 B
Plaintext
---
|
|
title: Convert a Blob to a ReadableStream
|
|
sidebarTitle: "Blob to ReadableStream"
|
|
mode: center
|
|
---
|
|
|
|
The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides several methods for consuming its contents in different formats, including `.stream()`, which returns a `ReadableStream`.
|
|
|
|
```ts
|
|
const blob = new Blob(["hello world"]);
|
|
const stream = blob.stream();
|
|
```
|
|
|
|
---
|
|
|
|
See [Binary Data](/runtime/binary-data#conversion).
|