question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request for stream support

See original GitHub issue

I’d like to request support for streams, so that we can download files via SFTP and pass them to other stream consumers with pipe().

I have been able to do this in an unofficial way like this, but it would be nice if there were a first-class function that could do this, like getStream() for example:

let sftp = new ...
await sftp.connect(...
const stream = sftp.sftp.createReadStream('filename', {encoding: null});
stream.pipe(fs.createWriteStream('out.dat'));

My use case is to download a file via SFTP and upload it to Amazon S3, so being able to do that with streams so that I don’t need to store any data locally would be very useful.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
joelharkescommented, Nov 29, 2018

@Crazometer i think this might have been fixed here: https://github.com/jyu213/ssh2-sftp-client/commit/4a66d255b37091a8d7378bfbcd8c27af3ebdc745

Back when i tried this, it didn’t work.

0reactions
joelharkescommented, Jan 15, 2019

my advice, use 2.4.3

although pumping/piping the create stream still doesn’t work in that version somehow (for me).

keep using:

sftp.sftp.createReadStream('filename', {encoding: 'utf-8'});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Streaming requests with the fetch API - Chrome Developers
From Chromium 105, you can start a request before you have the whole body available by using the Streams API. You could use...
Read more >
Contact Us - Stream Energy
We're here to help! Chat with an agent online, call Stream's Customer Support or fill out our request form.
Read more >
Getting Started With RSocket: Spring Boot Request-Stream
This request initiates a stream of data from the server to the client. The client then logs every message it receives to the...
Read more >
Source Streaming • Akka HTTP - Documentation
Akka HTTP pre-packages JSON and CSV entity streaming support, ... The final step is simply completing a request using a Source of tweets,...
Read more >
Streaming requests and responses | Apigee Edge
To enable request streaming you need to add the request.streaming.enabled property to the ProxyEndpoint and TargetEndpoint definitions in the proxy bundle and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found