|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
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!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
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!
|
|