Skip to content
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

feat: file downloads #332

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: file downloads #332

wants to merge 1 commit into from

Conversation

blakebyrnes
Copy link
Contributor

@blakebyrnes blakebyrnes commented Aug 23, 2021

This PR is a wip.

You can subscribe to "download" on a per-tab basis tab.on('download', download: Download => ....). Download in client has a "waitForFinished" that you can use to wait until the download is completed.

Currently, this is implemented by adding a hook into CorePlugins to a new Browser Context (ie, Incognito window).

The default plugin is currently registering the userDataDirectory/downloads as the downloads directory.

TODO:

  • update docs
  • fix skipped tests
  • downloads broken on windows
  • need a mechanism to cleanup downloads?
  • fix broken test about new window downloads
  • add a test that going to a pdf triggers a download (#361)
  • need a way to download the file from core?
  • fullstack test
  • if a navigation turns into a download, return that as the resource

@calebjclark Any other thoughts?

@spignataro
Copy link

Will this get implemented some day?

@blakebyrnes
Copy link
Contributor Author

Will this get implemented some day?

Secret agent has mostly been retired and replaced with Hero and Unblocked. The individuals interested in this feature went away, so it never got the interest/work to be completed. There's a branch in unblocked for much of this work, but it hasn't been looked at in a while. One issue I never resolved is that I think ultimately, downloads should feel like regular resources, which requires a few changes like streaming downloads.

Are you at all interested in trying to take on completing the feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Downloads (edited title)
2 participants