text to blob js code example
Example 1: blob to text javascript
var reader = new FileReader();
reader.onload = function() {
alert(reader.result);
}
reader.readAsText(blob);
Example 2: blob to text javascript
<RESPONSE PROMISE>
.then(r=>r.blob())
.then(r=>{
console.log(r.type)
return new Response(r)
})
.then(r=>
r.text()
)
.then(console.log)