-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
improve download, allow download of big files, works on ff and chrome #5466
Conversation
I have tried it in Gitpod:
@svenefftinge, please review/approve. I am not allowed to do it for a PR with my own changes. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that i have to press download twice to download.
Do we really need Copy Download Link
? If so i would prefer to have a separate menu item. If i suppose to share it 1m timeout seems to be really small.
Generally that's really good, UI is not blocked at all during preparing download. |
|
I did not experience this when I was updating the PR, so I have retested it again; it works. (Tried in Chrome and FF with Gitpod.) |
@kittaakos I meant that i have to click |
Hi! Its been awhile.. Just want to be clear that, If my memory serves me right, the Download Link acts like a temporary url shortener so you can use it to download big files in parallel using 3rd party downloader and is not meant to be used for sharing. IMO, the 1 minute expiry should be enough for someone to copy it and paste it on their downloader. Even if the link expires as long as the download is already started, it will not be interrupted. |
👍 This. Thank you for the clarification. |
But a special case should not harm the standard scenario? Is it good that a user has to click twice and see notification for a single file? As for |
This PR improves the download by letting the native browser handle it instead of fetching it in the background. This also adds a unique link which expires in 1 minute. Tested on chrome 73.0 and firefox 60.5 Signed-off-by: Uni Sayo <unibtc@gmail.com>
I have made the following changes:
|
|
The notification is discarded immediately, it is hard to see for small file(s).
|
I do not know how the copy/paste works in FF, but it seems, it is entirely unsupported the way we do: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard |
Updating the |
So it seems, in FF one has to actually click on a button to invoke the clipboard-copy, I am going to disable it if the browser is not Chrome. |
PoC: https://jsfiddle.net/kittaakos/ru18g04p/ |
From now on, either the download link can be copied to the clipboard or the download can be triggered without any further user interaction. Note: `Copy Download Link` works in Chrome only. #5466 (comment) Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Ready for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Download worked smooth, without double clicking. 👍
Copy download link worked but was confusing that a link is only in the clipboard after download is prepared. Would be better to pregenerate a link and give it immediately. Otherwise on big downloads it looks broken first time.
I'm going to approve it since it don't care much about Copy Download Link
right now. Someone can improve it later.
Thank you for your help, @uniibu 🥇 |
@kittaakos @akosyakov |
This is the follow-up of #4890
This PR improves the download by letting the native browser handle it
instead of fetching it in the background. This also adds a unique link
which expires in 1 minute. Tested on chrome 73.0 and
firefox 60.5
Signed-off-by: Uni Sayo unibtc@gmail.com