Hi Support,
We are converting from a pervious FTP library to your Pro version of EnterpriseDT.Net.Ftp library and have an issue which we need your help with.
We are making an FTP SSL connection using the SecureFTPConnection object with the following set before we connect:
_ftp.Protocol = FileTransferProtocol.SFTP;
_ftp.TransferType = FTPTransferType.BINARY;
_ftp.ConnectMode = FTPConnectMode.PASV;
Once the connection is successfully opened, we upload a file using:
_ftp.UploadStream(FileContentStream, fileName);
On the FTP server, we see the new file, but it is zero bytes in size.
If we switch to using the following for the upload, the file is the correct size:
_ftp.UploadByteArray(FileContentStream.ToArray(), fileName);
In both case, the stream being used is a MemoryStream.
Do you have any suggestions as to why the UploadStream method is not transferring the file correctly? We would prefer not to convert the MemoryStream to a Byte array for each upload.
Thank you,
Michael