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 **
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) ?