Александр
Member
I'm trying to upload a picture to the server via FTP but it gives an error: 550 ftp.tools/home/xe528416/logo.png: No such file or directory
Please tell me where I went wrong? I tried different options for the folder address. but nothing was sent to the server
FTP Upload:
Private Sub bt_ftp_Click
Dim FTP As FTP
If File.Exists (File.DirInternal,"a2.png")=False Then
File.Copy(File.DirAssets,"a2.png",File.DirInternal,"a2.png")
End If
FTP.Initialize("FTP", "xe528416.ftp.tools", 21, "xe528416_man", "Ga251udr24")
FTP.UseSSL = False
FTP.PassiveMode = True
FTP.AppendFile(File.DirInternal,"a2.png",True,"/home/xe528416/a2.png")
FTP.Close
End Sub
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
Please tell me where I went wrong? I tried different options for the folder address. but nothing was sent to the server