we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "js string to blob"
Anatole
13 Jan 2021
1const str2blob = txt => new Blob([txt]);
Alice
03 May 2016
1In order to extract data from a Blob, you need a FileReader.
2
3var reader = new FileReader();
4reader.onload = function() {
5    alert(reader.result);
6}
7reader.readAsText(blob);