Page 1 of 1

Intercept download ?

Posted: Mon Aug 20, 2018 6:43 pm
by thefunkyjoint
Hi,

Let's suppose this scenario :

1 - User navigates to a web-site where there is a link on a ZIP file.

2 - User clicks on this link.

I want to open this link (and download it) using the default machine's browser, not CEF4. Is this possible ?

Thanks !

Re: Intercept download ?

Posted: Mon Aug 20, 2018 7:13 pm
by salvadordf
Yes, it's possible with some exceptions.

Use the TChromium.OnBeforeDownload event, copy the URL from downloadItem.URL and call callback.cancel. Then use another program/service/component to download the URL you copied.

However, if you need to login in a website to download that file then you may have some problems. In that case, you would need to login again with the alternative downloader and some websites don't like to have users logged multiple times.

Some URLs can only be downloaded in the same browser. For example, the BLOB URLs used by mega.nz

Re: Intercept download ?

Posted: Tue Aug 21, 2018 3:55 pm
by thefunkyjoint
Thank you ! :D