Page 1 of 1

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

Posted: Wed 03 Aug 2022 09:21
by wg961423
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;

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

Posted: Fri 05 Aug 2022 12:04
by Dimon
Thank you for the information. We have reproduced the problem and fixed it. This fix will be included in the next SecureBridge build.