Empty File
hi, think you for your code its awsome, im using it to connect to Ftps server, rename and delete is working fine but when i try to upload a file from my folder to ftps files are always empty, i find them on the the FTP server but with size 0 this is my code plz help me i cant find a solution
Private Sub GetCsvFiles()
Try
Dim ftps = New FtpClient
ftps.Host = "111.222.333.444"
ftps.Credentials = New Net.NetworkCredential("aaaa", "bbbb")
ftps.Port = 990
ftps.DataConnectionType = FtpDataConnectionType.PASVEX
AddHandler ftps.ValidateCertificate, AddressOf OnValidateCertificate
ftps.EncryptionMode = FtpEncryptionMode.Implicit
ftps.Connect()
ftps.UploadFile("C:\envoisgtms\20212220.zip", "/testt/20212220.zip", FtpRemoteExists.Overwrite, FtpVerify.Retry)
ftps.DownloadFile("C:\envoisgtms\test3.txt", "/testt/test3.txt")
ftps.DeleteFile("/testt/20211230.zip")
If ftps.IsConnected Then
ftps.Disconnect()
End If
Catch ex As Exception
Console.WriteLine(ex.Message)
MsgBox(ex.Message)
End Try
If you want to accept all certs just use ValidateAnyCertificate = True rather than AddHandler ftps.ValidateCertificate, AddressOf OnValidateCertificate.
I have also empty file on remote ftp when I use UploadBytesAsync
@svarga91 Please make a new issue and add the detailed FTP logs so we can figure it out.
@svarga91 Is this issue still open on your side?
We need a full verbose log to find out why the uploaded file is empty. Perhaps the server is producing some error message, so a server log is also always a good idea in such a situation. At least also state what version of FluentFTP you are using? Or get the current newest version which has more debugging messages in a verbose log.