Topic "WinSCP sftp file size attribute"

Author Message
pszafranski

Guest


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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
SFTP specification says:

Quote:
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?
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License