TScFTPClient uploads a file of 0 bytes after setting UseCompression to True

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
wg961423
Posts: 8
Joined: Fri 23 Oct 2009 06:02

TScFTPClient uploads a file of 0 bytes after setting UseCompression to True

Post by wg961423 » Wed 03 Aug 2022 09:21

TScFTPClient was uploading files of 0 bytes after setting UseCompression to True.
After reviewing the source code, the problem can be solved by modifying the TScFTPClient.OnWriteData function as follows
procedure TScFTPClient.OnWriteData(Stream: TStream; const Data: TBytes; Count: integer);
begin
// FDataConnection.Write(TValueArr(Buffer), 0, Count);// This is the original code
FDataConnection.Write(TValueArr(Data), 0, Count);
DoProgress(FTotalUploadSize, FTotalUploadSize - (Stream.Size - Stream.Position));
end;

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: TScFTPClient uploads a file of 0 bytes after setting UseCompression to True

Post by Dimon » Fri 05 Aug 2022 12:04

Thank you for the information. We have reproduced the problem and fixed it. This fix will be included in the next SecureBridge build.

Post Reply