Как преобразовать строку в Blob в JavaScript
const str2blob = txt => new Blob([txt]);
Cyclopaaa
const str2blob = txt => new Blob([txt]);
In order to extract data from a Blob, you need a FileReader.
var reader = new FileReader();
reader.onload = function() {
alert(reader.result);
}
reader.readAsText(blob);