DotNetBrowser
1.21.5
|
Allows handling file downloads. More...
Inherited by DotNetBrowser.DefaultDownloadHandler.
Public Member Functions | |
bool | AllowDownload (DownloadItem downloadItem) |
This method is invoked when Browser is going to download a file. The download parameter contains all information about the the file which is going to be downloaded. More... | |
Allows handling file downloads.
When Browser instance cannot display a specified file (e.g. ///.zip file) the DownloadHandler.AllowDownload(DownloadItem)} method will be used to check whether this file can be downloaded. If this method returns TRUE, the file download is started.
You can use this handler to suppress all file downloads or download only files with a specific mime type.
bool DotNetBrowser.DownloadHandler.AllowDownload | ( | DownloadItem | downloadItem | ) |
This method is invoked when Browser is going to download a file. The download parameter contains all information about the the file which is going to be downloaded.
To suppress file download, this method must return FALSE.
By default the file will be downloaded into application's working directory. You can get or set the absolute file path using the DownloadItem.DestinationFile property.
downloadItem | information about the file that will be downloaded. |
Implemented in DotNetBrowser.WinForms.WinFormsDefaultDownloadHandler, DotNetBrowser.WPF.WPFDefaultDownloadHandler, and DotNetBrowser.DefaultDownloadHandler.