Hi I am creating chrome app using rediumjs.I want to download epub file from server BLOB. for that I written this code:
var url="http://10.11.9.1/TapRoot/Books/1408fd6cce7447e224cf/Extracted/toc.json";
var xhr = new XMLHttpRequest();
xhr.open("GET",url, true);
xhr.responseType = 'json';
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
var blob = this.response;
console.log(blob);
//Here I want to save this file in my local drive.
// saveAs(xhr.response, '../test123.epub');
// saveFile(this.response, '../temp/file.json');
}
};
xhr.send();
