I am trying to send and receive files to and from a FileZilla Server set to SFTP with certificate. I can connect and send a file and receive a file how ever they seem to be blank.
I also get notification that connection was terminated incorrectly.
any body have any ideas of anything else I need to be doing or missing..
I also get notification that connection was terminated incorrectly.
any body have any ideas of anything else I need to be doing or missing..
B4X:
Dim oFTP As FTP
Dim ssltrustmanager As CustomTrustManager
oFTP.Initialize("iFTP", "lucentalabsportal.com", 3100, <user>, <Password>)
oFTP.UseSSL = False
oFTP.UseSSLExplicit = True
oFTP.PassiveMode = True
ssltrustmanager.InitializeAcceptAll
oFTP.SetCustomSSLTrustManager(ssltrustmanager)
Sub btUploadMain_MouseClicked (EventData As MouseEvent)
'three commands I am using
oFTP.UploadFile(File.DirApp, "LabConnect.ini", True, "/LabConnect.ini")
oFTP.DownloadFile("/SpaceHolder.txt", True, File.Dirapp, "SpaceHolder.txt")
oFTP.List("/")
end sub
Sub iFTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub
Sub iFTP_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
Dim s As String
s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End Sub
Sub iFTP_DownloadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub
Sub iFTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log(ServerPath)
If Success = False Then
Log(LastException)
Else
For i = 0 To Folders.Length - 1
Log(Folders(i).Name)
Next
For i = 0 To Files.Length - 1
Log(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
Next
End If
End Sub
Last edited: