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
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?