#region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Private xui As XUI
Dim FTP As FTP
End Sub
Sub Globals
Private btnSend As Button
Private lblErg As Label
Private BtnClose As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Datasend")
FTP.Initialize("FTP", "xxxxxk.ddns.net", 21, "xxxx", "xxxxx123---")
End Sub
Private Sub btnSend_Click
Dim ZF As String="Bild.jpg"
Dim UP As String=File.DirRootExternal & "/MyDiary/Backup"
FTP.UploadFile(UP ,ZF, True, "WD-MyPassport0830-01/HandyUploads/MyDiary/" & ZF)
End Sub
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
Dim s As String
s = "Uploaded " & Round(TotalUploaded / 1024) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1024) & "KB"
lblErg.Text=S
Log(s)
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then
Log(LastException.Message)
Else
lblErg.Text="Upload abgeschlossen."
FTP.Close
End If
End Sub