eligrey / FileSaver.js

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

saveAs fails on chrome with no error #778

Open theahura opened 1 year ago

theahura commented 1 year ago

Thanks for this library.

I'm getting silent failures where, when I try to download using saveAs, it fails without any error or log -- a download simply never appears.

I'm using Chrome: Version 107.0.5304.87 (Official Build) (64-bit), on Ubuntu 20.02.

Any idea whats going on?

Example code:

import {saveAs} from 'file-saver'

const blob = new Blob(['helloworld'], {
  type: "application/json",
});

saveAs(blob, 'test')
theahura commented 1 year ago

Update: it looks like it fails silently if it is running in a WebWorker, which is where our code was running. Is there a way to add a warning if saveAs is used in a worker?

Wooyme commented 1 year ago

I faced the same problem,but not in a WebWorker when using Chrome 108.

sandeepk97 commented 1 week ago

Hi is this issue resolved? I am also facing silent failure to save

i am also using in worker. will this not work in worker? @theahura theahura