TScSFTPClient.UploadFile error in uploading a file

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

TScSFTPClient.UploadFile error in uploading a file

Post by wg961423 » Wed 19 Oct 2022 07:16

When the server already has the same file name and it is incomplete and needs to be appended, the 3rd parameter of UploadFile is set to false and the upload file will have an error, the file size is fine but the first half of the file is set to 0 and the appended content is placed at the end of the file.

After tracing the code, the code in the TScSFTPClient.OpenAndUploadFile function OpenModes := [foWrite, foCreate, foExcl]; needs to be changed to OpenModes := [foWrite, foCreate, foAppend]; to be able to properly Append the file.

Post Reply