using ' Chromium1DownloadUpdated' and 'Chromium1BeforeDownload' we may know that chromium start or remain downloading. So I can put a boolean variable(such as Ifdownloading :=true) in the procedures and set it to true.
But, sometimes downloading may be canceled by web errors or others. So downloadItem.IsComplete may not be triggered and I cannot set Ifdownloading to false.
How to resolve this problem? Thank you!
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
How to know chromium is not downloading files?
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to know chromium is not downloading files?
Hi,
You need to use TChromium.OnDownloadUpdated and TChromium.OnLoadError
Check the "downloadItem" parameter in the OnDownloadUpdated event. You need to check the returned value of downloadItem.IsCanceled, downloadItem.IsComplete and downloadItem.IsInProgress. Read this for more information :
https://magpcss.org/ceforum/apidocs3/pr ... dItem.html
You can also check the "failedUrl" parameter in TChromium.OnLoadError to see if some download item has that URL.
You need to use TChromium.OnDownloadUpdated and TChromium.OnLoadError
Check the "downloadItem" parameter in the OnDownloadUpdated event. You need to check the returned value of downloadItem.IsCanceled, downloadItem.IsComplete and downloadItem.IsInProgress. Read this for more information :
https://magpcss.org/ceforum/apidocs3/pr ... dItem.html
You can also check the "failedUrl" parameter in TChromium.OnLoadError to see if some download item has that URL.
Re: How to know chromium is not downloading files?
Thank you very much!