Topic "WinSCP sftp file size attribute"

Author Message


WinSCP' sftp always uses the original file size in SSH_FILEXFER_ATTR_SIZE, even for ASCII transfers when some bytes (record delimiters) may be stripped or converted as part of this type of transmission. If the receiving side is monitoring the number of bytes received and compares it to the original number of bytes reported in the file attributes, there is a mismatch. Would it be possible to report the number of bytes in file attributes by WinSCP after the conversion of a file to ASCII takes place so it matches the number of bytes sent, or not report it at all if it cannot be determined.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27082
Location: Prague, Czechia
SFTP specification says:

The `size' field specifies the size of the file on disk, in bytes. If it is present during file creation, it should be considered a hint as to the files eventual size.

Files opened with the SSH_FXF_TEXT flag may have a size that is greater or less than the value of the size field.

So I believe that that server should not compare bytes received with the size field.

What SFTP server has this problem?

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License