Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFTP upload repeats the tail of large files #69

Open
littlewatchman opened this issue Jan 15, 2024 · 2 comments
Open

SFTP upload repeats the tail of large files #69

littlewatchman opened this issue Jan 15, 2024 · 2 comments

Comments

@littlewatchman
Copy link

upload of small files seems to work fine.
for some longer html I find the last few lines repeated on the uploaded file.
for a big zip file, 66.4Mb .... the uploaded version is 68.8Mb and won't unzip. But if I download it and manually truncate it at the correct length, it unzips and is 100% correct content.

so clearly it seems to be just repeating bytes to the tail during upload.

my upload is pretty basic
sftp.upload(data: data, remotePath: remote, permissions: .default)

so not sure how it can be something I'm doing wrong, but just in case, please let me know.
otherwise I'll download the source code and see if I can find out what's going on.

@littlewatchman
Copy link
Author

BTW... I also did try saving the data to a local file and using
sftp.upload(localURL: localURL, remotePath: remote, permissions: .default)
exactly the same problem, creating exactly the same remote file. 100% identical, including the same extra bytes at the end

@littlewatchman
Copy link
Author

code looks right (actually looks good too). stepping through ended with bytes sent being correct.
might be at the ISP end? so weird.
but if anyone has suggestions... thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant