You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This is not a bug but rather a question related to working of download API.
I have already checked #58 and understand how can I use passThrough or writeStreams to download the files or simultaneously. I couldn't find any example for reading partial data from a file.
Example code
A short and standalone code example that demonstrates the issue. Don't copy-paste a few lines from your project, it makes it difficult to rule out issues in other parts of your code.
const client = new Client();
await client.access();
const files = await client.list('/out');
const readStream = new Stream.PassThrough();
await client.downloadTo(transform, `/out/${selectedFile.name}`);
// how to stop the above operation so it doesn't read complete file.
Console output
Use client.ftp.verbose = true to log every communication detail. Copy-paste the output of your console here. Make sure to redact IPs, URLs or passwords.
Which version of Node.js are you using?
v21.2.0
Which version of basic-ftp are you using?
^5.0.5
Additional context
Add any other context about the problem here. What FTP server are you using? What environment are you running in?
The text was updated successfully, but these errors were encountered:
Yes, need this feature too. I see that I can set the start byte but I see no way to set the end byte as it is possible in fs.createReadStream or s3.GetObject api or mongo GridFS bucket.openDownloadStream api.
I need this feature to properly implement Range http header support for our file service rest api with file/ftp/s3/mongo/... adapters.
I suppose it is possible to somehow wrap destination to stop reading but have not tried yet. At any case it is better to implement in Reader than hacking with Writer.
Describe the bug
This is not a bug but rather a question related to working of download API.
I have already checked #58 and understand how can I use passThrough or writeStreams to download the files or simultaneously. I couldn't find any example for reading partial data from a file.
Example code
A short and standalone code example that demonstrates the issue. Don't copy-paste a few lines from your project, it makes it difficult to rule out issues in other parts of your code.
Console output
Use
client.ftp.verbose = true
to log every communication detail. Copy-paste the output of your console here. Make sure to redact IPs, URLs or passwords.Which version of Node.js are you using?
v21.2.0
Which version of basic-ftp are you using?
^5.0.5
Additional context
Add any other context about the problem here. What FTP server are you using? What environment are you running in?
The text was updated successfully, but these errors were encountered: