Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser BeforeDownload path Options
hmireault
Posted: Thursday, June 7, 2018 2:18:16 PM
Rank: Member
Groups: Member

Joined: 7/14/2014
Posts: 23
Hello,

When using the EO.WebBrowser, you have access to the DownloadCompleted event. This event has DownloadEventArgs where you can specify the FilePath and also show the dialog. Using both you can set a default path for the download prompt.

What I would like is to be able to use the "last downloaded to" path as my FilePath when prompting. The problem is I can't find a way to get the path after the user has selected it.

Is this currently possible, or is it something that could be added?

Regards.
eo_support
Posted: Monday, June 11, 2018 2:35:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,675
Hi,

The event you described should be BeforeDownload event. That's where you set the default path.

After user select a path and the download continues, you will receive DownloadUpdated/DownloadCompleted event. Inside those events you can access the e.DownloadItem.FullPath to get the full local path of the file that's being downloaded. You can use this path to derive the default path of your next download.

Thanks!
hmireault
Posted: Monday, June 11, 2018 2:51:50 PM
Rank: Member
Groups: Member

Joined: 7/14/2014
Posts: 23
Hello,

Thank you. How often does the DownloadUpdated event trigger? I'm wondering what happens when you download multiple files. Does it only trigger once per download?
I'd rather not use the DownloadCompleted event since if the user wants to download multiple files in succession and they're quite big, it wouldn't change the default path for a while.

Regards.
eo_support
Posted: Monday, June 11, 2018 2:54:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,675
Hi,

The primary purpose of DownloadUpdated event is for you to update UI (such as displaying a progress bar), so it is triggered quite often.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.