How to get the string from a blob with JavaScript?

Spread the love

To get the string from a blob with JavaScript, we use the Response constructor.

For instance, we write

const text = await new Response(blob).text();

to create a Response object from the blob.

And we call text to return the text version of the blob.

Leave a Reply

Your email address will not be published. Required fields are marked *