Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Sftp uploads empty file

$
0
0

Could you help me with this I am having the same problem.  Here is my code.

 

 

using (SftpClient client = new SftpClient("172.17.1.5", "user", "password")){




 client.Connect();

 MemoryStream temp = new MemoryStream();
 client.DownloadFile("Dir\\file.pdf, temp);


 client.UploadFile(temp, "Dir\\downloadedfile\\filenew.pdf");



 temp.Flush();
 temp.Close();


 fs.Flush();


 fs.Close();


}

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>