Public oFTP As FTP 'in my case Starter service Process Global
'Starter Service Create
'Initialise FTP ... called from sub Main - activity start and pause
Dim serverPath As String= "ftp.xxxxx.net"
Dim username As String= "xxxx123"
Dim password As String= "xxxxAbCd"
oFTP.Initialize("ftp", serverPath, 21, username, password)
oFTP.PassiveMode = True 'might not be neccessary
Public Sub UploadCurrentDB As ResumableSub
'upload the db .. 3rd arg = False (non Ascii file)
Dim sf As Object = oFTP.UploadFile(File.DirInternal,"appdata.db", False, "/app-files/xxxmyapp/data.db" )
Wait For (sf) ftp_UploadCompleted (ServerPath As String, Success As Boolean)
If Success Then
Log("file was uploaded successfully")
Else
Log("Error uploading file")
End If
Return Null
End Sub