2023-09-21, 15:28:09
Hi,
Yes you can download any type of file that you want.
If you have the URL’s of the files you want to download then the following example might help.
Say you have a button Download and you use the NavigateWithWebResourceRequest method to directly download the file as a “GET” request.
Private Sub DownloadButton_Click()
Dim URL As String
URL = "https://antwise.com/download/testEfi.iso.zip"
EdgeWebBrowser.NavigateWithWebResourceRequest URL, "GET", "", ""
End Sub
And then in the AntView object you can handle the request like so:
Private Sub EdgeWebBrowser_OnDownloadStarting(Cancel As Boolean, Handled As Boolean, ByVal DownloadOperation As AntViewAx.IAntViewDownloadOperation, ResultPath As String, ResultFileName As String)
Handled = True
ResultPath = "C:\Zips\"
ResultFileName = "testURL1.zip"
End Sub
This assumes that you have a folder named “C:\Zips” for storing the downloaded files, so adjust that to your needs.
Hope this helps,
--
Wil
Yes you can download any type of file that you want.
If you have the URL’s of the files you want to download then the following example might help.
Say you have a button Download and you use the NavigateWithWebResourceRequest method to directly download the file as a “GET” request.
Private Sub DownloadButton_Click()
Dim URL As String
URL = "https://antwise.com/download/testEfi.iso.zip"
EdgeWebBrowser.NavigateWithWebResourceRequest URL, "GET", "", ""
End Sub
And then in the AntView object you can handle the request like so:
Private Sub EdgeWebBrowser_OnDownloadStarting(Cancel As Boolean, Handled As Boolean, ByVal DownloadOperation As AntViewAx.IAntViewDownloadOperation, ResultPath As String, ResultFileName As String)
Handled = True
ResultPath = "C:\Zips\"
ResultFileName = "testURL1.zip"
End Sub
This assumes that you have a folder named “C:\Zips” for storing the downloaded files, so adjust that to your needs.
Hope this helps,
--
Wil