lukaaash / sftp-ws

SFTP over WebSockets - client and server package for Node.js
MIT License
34 stars 16 forks source link

Make shorter files on remote server #5

Closed ntropy25 closed 5 years ago

ntropy25 commented 8 years ago

Hi! I appreciate your great work. I’ve tested the web-client sample for several machine environments. On local machine or on server on LAN, it works great. But, soon I found that if the server is located remotely on the internet, the length of the uploaded files is simply shorter than the originals. For example, if I uploaded 490,744 bytes file, it made 393,216 bytes file. I found that the end of the file was missing. 26,253,806 bytes file made 26,181,632 bytes and still end of the file was truncated. Do you have any idea?

lukaaash commented 8 years ago

Hi, many thanks for reporting this!

It was caused by a bug in Blob-based data reader - it got handling 'readable' state quite wrong, and due to lack of any automated browser-based tests, it went unnoticed for a long time. I'm not actively using the browser-based client myself yet...

I tried fixing it and now it seems to working properly - please update to the current version and give it a try.

I will test this more thoroughly myself tomorrow as well.

ntropy25 commented 8 years ago

Thank you very much for the fast reply. I've tried new version. (npm update sftp-ws or remove and install it again and rebuild from the source) But, sadly the symptom is the same.

ntropy25 commented 8 years ago

Oh! It works.

I didn't change //nuane.com/sftp-plus/sftp-0.7.0.min.js" to //nuane.com/sftp-plus/sftp-0.7.1.min.js

Sorry. And thank you again.