question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Downloads

See original GitHub issue

It would be nice to have an api like:

page.on('download', async download => {
   const buffer = await download.data();
   console.log('got download', download.url(), buffer.length);
});

We can hack it with Page.setDownloadBehavior in chromium and monitoring the download folder, but it would be nicer to have something like download interception in all of the browsers.

Should the event come when the download starts, or when it finishes? I think when it starts.

Previous discussion in puppeteer: puppeteer/puppeteer#299

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
DavertMikcommented, Feb 6, 2020

I love the API! However, I am really fine with just specifying the download directory without intercepting the request on its own. If I could have a file saved in a proper directory I can open it by myself once it is written and do all manipulations there.

It would be nice to have an event like donload.complete but I’m not sure where this event should be attached… Anyway, at this moment we can just monitor directory for a file and that’s enough for us!

1reaction
joelbyfordcommented, Feb 7, 2020

Believe that comment was for @JoelEinbinder instead 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Download Windows 10 Media Feature Pack - Microsoft
The Media Feature Pack for N versions of Windows 10 will install Media Player and related technologies on a computer running Windows 10...
Read more >
Download Feature: Movies & TV - Amazon.com
##Find your downloaded movies or TV episodes## To watch downloaded videos, tap the Downloads tab in the Prime Video app on your iPhone...
Read more >
Features - Free Download Manager
Free Download Manager features. Remote Control. Create new downloads on a remote PC/Mac using your Android device. Both need FDM installed.
Read more >
Features – Easy Digital Downloads
View everything there is to know about customer file downloads from your system. You will have access to details such as download dates...
Read more >
Approve what kids buy with Ask to Buy - Apple Support
If the family organizer declines the request, no purchase or download will take place. If a child redownloads a purchase, downloads a shared ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found