B4J Question FTP - event DownloadProgress

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi,
i'm using the FTP for download any files from server and using event DownloadProgress for showing the progress. But the Total values is even -1.

this is the code:

B4X:
mFtp.Initialize("ftp", mFTPAddress, 21, mFTPUSer, mFTPPsw)
    mFtp.PassiveMode     = True
    mFtp.UseSSL         = False
    mFtp.UseSSLExplicit = False

Private Sub ftp_DownloadProgress(ServerPath As String, TotalDownloaded As Long, Total As Long)
    Log("download.." & ServerPath & " progress"  & (TotalDownloaded / 1024) & " total" & Total)
End Sub

download..InstallAgon/EnumerativiFIleDati+Script/State.xml totale 42.8359375 dimensione -1

can modify any value?

thank
regards
 
Last edited by a moderator:

Roberto P.

Well-Known Member
Licensed User
Longtime User
It will always show -1. Don't use that parameter. It was added by mistake.

Erel
do you have any method for read the size of the file before download?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…