|
-
Mar 28th, 2019, 12:47 PM
#1
Re: VB6 Simple Async-Download-Ctl for multiple Files
 Originally Posted by yinxiaodan
How to support a password FTP file download, thank you!
The VB-Usercontrol-Async-support does not offer this via Parameters,
so you'll have to try passing the credentials in the old-fashioned way, by directly including them in the (ftp-)URL:
HTH
Olaf
Last edited by Schmidt; Mar 28th, 2019 at 12:50 PM.
-
Mar 29th, 2019, 10:02 AM
#2
Junior Member
Re: VB6 Simple Async-Download-Ctl for multiple Files
Schmidt, thank you. The test was unsuccessful. Does RC5 have the function of FTP upload and download with password?
-
Mar 29th, 2019, 01:57 PM
#3
Re: VB6 Simple Async-Download-Ctl for multiple Files
 Originally Posted by yinxiaodan
Does RC5 have the function of FTP upload and download with password?
No FTP-Upload-feature is encapsulated in a convenience-class, no...
For the Download-direction though, you could try the cDownloads-Class (just tested this again on Win10 with my own FTP-server successfully):
Code:
Option Explicit
Private WithEvents DLs As cDownloads
Private Sub Form_Load()
Dim Host: Host = "MyHostDomain.de"
Dim Path: Path = "/pdf/SomePdfFile.pdf"
Set DLs = New_c.Downloads
DLs.Download "ftp://" & Host & Path, dl_FTP, , , "MyUsername", "MyPassword"
End Sub
Private Sub DLs_DownloadStart(DownloadObj As cDownload)
Debug.Print "DL-Start with URL: " & DownloadObj.URL
End Sub
Private Sub DLs_DownloadProgress(DownloadObj As cDownload, ByVal Percent As Single, ByVal StatusCode As Long, StatusDescription As String, StatusValue As String)
Debug.Print "DL-Progress with URL: " & DownloadObj.URL, Percent, StatusCode, StatusDescription, StatusValue
End Sub
Private Sub DLs_DownloadComplete(DownloadObj As cDownload, ByVal ErrNum As Long, ErrString As String)
Debug.Print "DL-Complete with URL: " & DownloadObj.URL, ErrNum, ErrString, DownloadObj.GetContentLen
End Sub
Note, that the cDownloads-Class is not a "full FTP-Client" (it's "true to its name" - and does only downloads...
e.g. it does not support Dir-Listings - and so you will have to know the Filename and Path beforehand on your FTP-Server).
FWIW - I've uploaded a fully implemented FTP-Client of mine here:
http://www.vbforums.com/showthread.p...n-Winsock-ocx)
This is > 20 years old code, based on the Winsock.ocx - but with full control over the FTP-command-channel -
Maybe that helps already - but it's surely not the only VB6-FTP-client-implementation when you google a bit...
In case you need this for your own WebHosting (to synchronize between local Files and your production-environment)...
the first thing I've done on my own WebHost was, to implement appropriate *.asp-Scripts, which allowed me Dir-Listings and File-Transfers directly and secure via https.
So, personally I try to avoid FTP-stuff as often as I can - it's old-fashioned - and only secure with extensions like FTPS or SFTP -
and firewall-wise always a nightmare to "configure and make work" at some customer.sites (especially when some customers have thrown Proxies into the mix in addition).
Olaf
-
Mar 29th, 2019, 08:16 PM
#4
Junior Member
Re: VB6 Simple Async-Download-Ctl for multiple Files
I admire your selfless efforts. RC5 has made my programming much easier and helped me tremendously. Do you have a follow-up upgrade plan? It is suggested that donation portals can be set up on your website if possible, so that RC5 can develop better. Thank you again, Olaf.
-
Mar 31st, 2019, 08:36 AM
#5
Re: VB6 Simple Async-Download-Ctl for multiple Files
 Originally Posted by yinxiaodan
RC5 has made my programming much easier and helped me tremendously.
Do you have a follow-up upgrade plan?
There is not much missing in the RC5 currently (aside from perhaps a few classes, which wrap libCURL -
or some other platform-independent "web-protocol-access-lib" - with the goal to get independent from the MS-inet-stack)
 Originally Posted by yinxiaodan
In addition, VB6 to control file upload and download, what is a good way to achieve fast and asynchronous execution?
Upload- and Download to WebServers?
Using what protocol?
If it's "Web-Servers" and http/https...:
- the Download-direction is usually easy (e.g. for static files, no special serverside script is needed)
- whereas for Uploads you will need appropriate serverside scripts, which handle the incoming "raw-file-data" (which can be send in several different formats).
Olaf
-
Mar 29th, 2019, 08:33 PM
#6
Junior Member
Re: VB6 Simple Async-Download-Ctl for multiple Files
In addition, VB6 to control file upload and download, what is a good way to achieve fast and asynchronous execution?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|