New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress of downloading zip file from s3 presigned url not showing in browsers #780
Comments
Hi @eligrey and @jimmywarting, sorry for tagging, but could you take a look at my question above? So that I know should I wait for any answer. |
Need to see some code example both server/client side to be able to help.
fyi, you can't use ajax (fetch or xmlhttprequest) to save it... It says so in the wiki:
|
Hi @jimmywarting, thanks for your reply! const link = document.createElement('a');
link.href = url;
link.download = filename;
link.click(); or just: window.open(url, '_self'); Basically, I'm satisfied with this solution, but I have doubts that this isn't the most efficient/right approach to downloading large files (a few GB) on the client side. Did you mean this approach? Should I look for another solution? FileSystem API implementation, StreamSaver, etc. |
Yea, I assure you that that is the best solution. Old regular Native browser download is better than any js solution. Even for large files. (if it also has |
if you have many gigabyte of large files (like up to 4 GiB) then i would also offer a torrent file. there is ways to run torrent clients on a server too. webtorrent is an example of a programmable torrent client that works with both NodeJS and browsers. |
Hi all!
I'm using a file-saver to save a zip-files from an s3 presigned url - I get a blob from a request and pass it to a file-saver with a custom filename. Now, after the download starts, the file is downloaded in the background and only after the download is completed it immediately appears in the browser download list (and at the bottom panel of Google Chrome f.e.). But I just want to see the progress of downloading the file immediately after the download starts (with the remaining time and the total file size as in the bottom bar, usual for Google Chrome).
According to this guide https://github.com/eligrey/FileSaver.js/wiki/Saving-a-remote-file#using-http-header I added 'Content-Disposition: attachment; filename=some-name.zip' header in s3 presigned url response but it didn't help. I haven't tried other options from this guide as they look like a crutch. But I can be wrong.
What am I doing wrong? What could be the issue? Should I try a different approach? I'll be appreciate for any help.
The text was updated successfully, but these errors were encountered: