Dim ftp As FTP
ftp.Initialize("FTP","server",21,"xxxxxxxx","xxxxxxxx")
ftp.PassiveMode = True
Dim jrf As Reflector
jrf.Target=ftp
jrf.GetField("client").As(JavaObject).RunMethod("setRemoteVerificationEnabled", Array(False))
Dim upl As Object=ftp.UploadFile("C:\Users\User\Downloads\","file.doc",False,"/serverpath/file.doc")
Wait For(upl) ftp_UploadCompleted(serverPath As String, Success As Boolean)
If Success Then
ftp.Close
Else
ftp.Close
Return
End If