Android Question Error in getting value of total in ftp server

maddy

Member
Licensed User
Hey b4a community i am always getting total value of -1 and i am unable to determine filesize through ftp server?
B4X:
Sub FTP_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
    Dim s As String
    s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
    Log(TotalDownloaded/1000)
    Log(Total)
    'ProgressBar1.Progress=
    If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
    
    Log(s)
End Sub
Can Anyone help me out regarding this? @Erel
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
You know that this code is okay because you have more or less copied it from the tutorial, so the problem must be elsewhere. Does the file that you want actually download? What is the size of the file?
 
Upvote 0
Top