Download images directly? - Printable Version +- Antwise community forums (https://forums.antwise.com) +-- Forum: Antview (https://forums.antwise.com/forumdisplay.php?fid=11) +--- Forum: Antview for Windows (https://forums.antwise.com/forumdisplay.php?fid=12) +--- Thread: Download images directly? (/showthread.php?tid=165) |
Download images directly? - hys999 - 2023-09-21 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 RE: Download images directly? - wila - 2023-09-21 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 |