Posts in 2021
-
How to Convert String to Blob
Friday, July 23, 2021 in JavaScript
Categories:
less than a minute
The simplest way is to use the Blob constructor. To convert a string to Blob const str = 'hello world'; const blob = new Blob([str], { type : 'plain/text' }); To convert a JSON to Blob const obj = { hello: 'world' }; const …