__Method Name:__ UploadFile()
__Issue:__ Files Uploaded to FTP Server has Inconsistent Behavior
I am trying to upload the file from local path to the ftp server, there is no exceptions in the uploadFile() method , but most of the times files were not uploaded and few times empty file was being uploaded.
Here is my code for uploading a file to the server:
using (var sftp = new SftpClient(sftpHost, user, password))
{
sftp.Connect();
string FilePath = "D:\\CurrentTask\\in\\new.txt";
string remoteFileName = "/folderName/filename.txt";
Stream fs = File.OpenRead(FilePath);
sftp.UploadFile(fs, remoteFileName);
sftp.Disconnect();
}
Could you help me to resolve this issue?
Thanks in Advance.
Comments: No feedback.
Please reopen this issue if you have more information, and you're willing to work with us to find and resolve this issue.
__Issue:__ Files Uploaded to FTP Server has Inconsistent Behavior
I am trying to upload the file from local path to the ftp server, there is no exceptions in the uploadFile() method , but most of the times files were not uploaded and few times empty file was being uploaded.
Here is my code for uploading a file to the server:
using (var sftp = new SftpClient(sftpHost, user, password))
{
sftp.Connect();
string FilePath = "D:\\CurrentTask\\in\\new.txt";
string remoteFileName = "/folderName/filename.txt";
Stream fs = File.OpenRead(FilePath);
sftp.UploadFile(fs, remoteFileName);
sftp.Disconnect();
}
Could you help me to resolve this issue?
Thanks in Advance.
Comments: No feedback.
Please reopen this issue if you have more information, and you're willing to work with us to find and resolve this issue.