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

Disable Auto-Download Options
BenjaminSimpson1989
Posted: Friday, January 5, 2018 6:57:53 AM
Rank: Member
Groups: Member

Joined: 1/12/2015
Posts: 29
I am loading an HTML file into a WebView and it's automatically prompting to download a SWF file. Is there any way in the latest version to disable the prompt and not even initiate the download at all? Or at least a way to cancel the download after it starts?
eo_support
Posted: Friday, January 5, 2018 10:23:25 AM
Rank: Administration
Groups: Administration

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

Yes. You can cancel the download through BeginDownload event:

https://www.essentialobjects.com/doc/webbrowser/customize/download.aspx

If you need to cancel the download, you would need to call DownloadItem.Cancel method to cancel the download.

Thanks!
BenjaminSimpson1989
Posted: Monday, January 8, 2018 10:35:17 AM
Rank: Member
Groups: Member

Joined: 1/12/2015
Posts: 29
Thank you for your reply. I tried that but when I run multiple applications (each with one engine) on similar HTML files, I'm still occasionally getting prompted with the download dialog.
eo_support
Posted: Monday, January 8, 2018 12:44:09 PM
Rank: Administration
Groups: Administration

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

We are not aware of any problem about this feature. If you continue to have problem, please try to isolate the problem into a test project and send the test project to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

We will be happy to investigate further as soon as we have that.

Thanks!
BenjaminSimpson1989
Posted: Monday, January 8, 2018 5:24:40 PM
Rank: Member
Groups: Member

Joined: 1/12/2015
Posts: 29
I was able to stop the download by putting these two lines in the BeforeDownload handler:
Code: C#
e.Item.Cancel();
e.ShowDialog = false;

and putting this line again in the DownloadUpdated handler:
Code: C#
e.Item.Cancel();
eo_support
Posted: Monday, January 8, 2018 5:28:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Ah. Thanks for sharing!


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.