gtg092x / gulp-sftp

Gulp SFTP Deploy
140 stars 61 forks source link

switched read to file stream, basic progress #4

Closed valan closed 10 years ago

valan commented 10 years ago

I was getting 0 byte files uploaded (on windows). converting to a file read stream fixed it for me

also added very basic progress indication, total bytes uploaded

valan commented 10 years ago

I tried just passing the file buffer contents to stream.end() but it ran out of memory

gtg092x commented 10 years ago

Thank you!

gtg092x commented 10 years ago

Looks like there was an issue with ssh2 library that closed sftp streams if too large of a buffer was piped to an sftp writable stream. I have some arbitrary cutoffs in the code, which I don't like, but it seems to make things work for me.