interface gets the binary file and downloads it using the a tag. The file name is not known. How to parse to get the file name.
var blob = this.response;
var reader = new FileReader();
reader.readAsDataURL(blob); // base64ahref
reader.onload = function (e) {
// a
var a = document.createElement("a");
a.download = fileName;
a.href = e.target.result;
$("body").append(a); // firefoxclick
a.click();
$(a).remove();
defer.resolve(true);
};
how to make the downloaded file get its own file name automatically without fileName.
this method does not seem to work to download files of 5 and 6mb, and does not jump out of the file selection box.
do you have any good ideas?
using fileSave, it seems that you also need a file name to save.