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: olegkap **
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: olegkap **
Hi,
I am glad it fixed in source tab version.
I will try to make a new release as soon as possible.
I have my local source in the middle of changes so it will take me a while to do a new release.
Thanks,
Oleg