Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Issue: SftpClient.UploadFile Truncates Uploaded File [1533]

$
0
0
I'm uploading a file with 7MB size and the file is truncated to 4.5MB more or less.

I tried a Flush on the Stream but I always has the error

```
streamFile = // Load Stream
streamFile.Flush();
streamFile.Position = 0;

try
{
// Connect to sftp site
this._sftpClient.Connect();

if (!this._sftpClient.IsConnected)
throw new Exception(string.Format("Could'n connect to server {0}", this._sftpClient.ConnectionInfo.Host));

this._sftpClient.UploadFile(streamFile, string.Format("{0}{1}", this.RelativePath, this.FileName), true);
}
catch (Exception error)
{
logger.Error("Error uploading file.", error);
}
finally
{
if (this._sftpClient.IsConnected)
{
try
{ this._sftpClient.Disconnect(); }
catch (Exception error)
{ logger.Error("Couldn't disconnect global SFTP connection.", error); }
}
}
```
Comments: ** Comment from web user: drieseng **

Can you please verify that this issue is fixed in the latest release (or in a version built from SVN) ?


Viewing all articles
Browse latest Browse all 1026

Trending Articles



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