I have an issue using B4A 2.02 and the FTP net lib. I am writing a Class for FTP that I will share once I am done. All works fine so far but the Total in FTP_DownloadProgress always returns -1. I want to update a ProgressBar with the download but the Total is missing. I saw in the first post of this thread the code used is If Total > 0 Then. Is this an item that is returned from some servers and not others, etc. The TotalDownloaded is fine, it's just the Total that always returns -1. I can just skip the ProgressBar and continue on but I would like the ProgressBar option if there is a reliable way to get the Total value.
B4X:
Private Sub FTP_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
PB2.Visible = True
PB2.BringToFront
PB2.Progress = (100 / Total) * (TotalDownloaded)
End Sub
Last edited: