Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Download images directly?
#1
hello.
The jpg file opened by the address is displayed.
Save that file to a specific folder on your computer with a specific file name.
Is there a way to download+save immediately?


ex)
https://abcd.com/test.jpg ==> c:\myimage\test777.jpg
HeartThankyou.
Reply
#2
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)