eligrey / FileSaver.js

An HTML5 saveAs() FileSaver implementation
https://eligrey.com/blog/saving-generated-files-on-the-client-side/
Other
21.58k stars 4.38k forks source link

saveAs fails on Firefox without any error #726

Closed Xwilarg closed 2 years ago

Xwilarg commented 3 years ago

Hi,

I'm trying to download a zip file using FileSaver.js from an extension, it works fine on Chrome but on Firefox it fails without any error My code is like that:

this.#zip.generateAsync({type: "blob"}, function(elem: any) {
    // [...]
})
.then(function(content: Blob) { // Zipping done
    self.currentProgress = 100;
    try {
        console.log("done zipping");
        console.log(self.downloadName + "." + self.useZip);
        console.log(content);
        FileSaver.saveAs(content, self.downloadName + "." + self.useZip);
        console.log("file downloaded");
    } catch (e) { console.error(e); }
});

The console output is the following: image But no file is downloaded

I'm on Firefox 92.0

Beungoud commented 3 years ago

Same problem here. Still doesn't work when reinstalling Firefox. Works again when reinstalling an other instance of firefox side by side.

Xwilarg commented 2 years ago

Looks like this was fixed with one of the recent update of the library