FTP.Initialize("FTP","www.xxxx.com.brr",21,"xxx","xxxx")
FTP.PassiveMode=True
Try
Dim sf As Object = FTP.UploadFile(File.DirRootExternal, "/Documents/aw.png", False, "/aw.png")
Wait For (sf) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Catch
Log(LastException)
End Try
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
Dim s As String
s = "Uploaded " & Round(TotalUploaded / 1000) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub