Questions tagged [nodejs-stream]

A stream is an abstract interface for working with streaming data in Node.js. The stream module provides a base API that makes it easy to build objects that implement the stream interface.

306 questions
2
votes
1 answer

How to handle massive text-delimited files with NodeJS

We're working with an API-based data provided that allows us to analyze large sets of GIS data in relation to provided GeoJSON areas and specified timestamps. When the data is aggregated by our provider, it can be marked as complete and alert our…
Fell
  • 135
  • 2
  • 8
2
votes
3 answers

Does Azure blockBlobURL.download() have a limit to file size?

I'm using Azure's blockBlobURL.download() to download an image but am only receiving the top portion of the image. Is there a limit to how much I can download from Azure blob to a readable stream? The content length is 172628 and there exists a…
Nick Lee
  • 842
  • 2
  • 11
  • 27
2
votes
2 answers

Piping an axios request to a pkgcloud storage upload causes a "write after end" error

I'm trying to download an external file with axios, and then pipe it into an openstack object storage container using pkgcloud. The upload stream appears to end before the file is fully downloaded. async function upload(url, name, extension,…
Adam Smith
  • 357
  • 4
  • 13
2
votes
0 answers

If database data is changed its automatically changing in redis cache?

I implement redis cache in node js using mongodb its working fine.but I have doubt In mongodb I have 10 records.I tried to exceute my node js code its get data from db and stored cache its working fine.suppose I deleted data from db but its not…
smith hari
  • 437
  • 1
  • 11
  • 22
2
votes
2 answers

How to implement jwt verify token in node js

I tried to implement jwt token generation in node js.I got jwt token but how to validate token using node js crud operation.but I got token jwt verfiy code using callback function.without call back function used to implement async/awit function…
smith hari
  • 437
  • 1
  • 11
  • 22
2
votes
1 answer

Converting a doc Node.js buffer into pdf file to output it into the client

I have a docx Node.js buffer. var buf = doc.getZip() .generate({type: 'nodebuffer'}); console.log("buffer is ", buf); I am getting the buffer like
Atul kumar singh
  • 454
  • 10
  • 24
2
votes
0 answers

Read first 4 bytes from a socket, then forward the rest to another socket

I'm working on a sort of reverse proxy. I'll avoid explaining the full architecture here, but it requires that one side needs to send ID of the socket from which it receives data. A simplified example: // This is an array of sockets that are waiting…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
2
votes
1 answer

Data not being transformed Node.js Transform streams

I'm trying to make a transform stream flow that is taking data from socket.io, converting it to JSON, and then sending it to stdout. I am totally perplexed as to why data just seems to go right through without any transformation. I'm using the…
coolboyjules
  • 2,300
  • 4
  • 22
  • 42
2
votes
1 answer

Streams and event loop - do data handlers always fire on next tick?

Say I have a readable stream, like so: const strm = fs.createReadStream(file); strm.on('data', function onData(d){}); my question is, does the onData callback fire in the next tick of the event loop? Or is it possible for the onData handler to be…
user7898461
2
votes
1 answer

how to save png format to pdf format using pdfkit in nodejs [code included]

I am doing a server side coding and wanted to convert the file extension to pdf extension and it should be saved in S3. Any suggestions will be valuable. I am a beginner in this area, so apologies if the question offends anyone. uploadFiles: (files,…
AksharaDL
  • 63
  • 10
2
votes
1 answer

How to create a readStream from bytes in memory?

All of the examples of stream creation I have encountered are centered around file. I am working with an interface that requires me to pipe a read stream to a write stream. My input is raw bytes I have in memory, not a…
Robert Christian
  • 18,218
  • 20
  • 74
  • 89
2
votes
0 answers

Upload from writestream to S3 in node.js

The idea here is to create a XML file using xmlbuilder and use a xmlbuilder's streamWriter feature to pipe the output directly to S3. My approach here is to pipe the input of the writable stream into a readable stream and upload the readable stream…
ofhouse
  • 3,047
  • 1
  • 36
  • 42
2
votes
1 answer

process.stdout.write / process.stderr.write monkey-patch works in child process but not parent

So I have this simple monkey-patch on process.stdout.write / process.stderr.write const strm = fs.createWriteStream(logfile); const stdoutWrite = process.stdout.write; process.stdout.write = function () { …
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
1
vote
0 answers

AWS SDK for Javascript v3 S3Client GetObjectCommand gives Error: unexpected end of file

In my AWS Lambda function, I have this code that extracts contents of a zip file in S3 bucket into local file system. It is using nodejs stream to avoid downloading the entire zip file first, to save memory: import unzipper from 'unzipper'; import…
Kid_Learning_C
  • 2,605
  • 4
  • 39
  • 71
1
vote
1 answer

Does the eSignature API's NodeJS SDK support data streaming?

The envelopes.getDocument method wraps EnvelopeDocuments:get and return a PDF file as a byte stream. Alternatively you can request a base64-encoded string. My question is: Is it possible to stream that file chunk by chunk instead of downloading and…
uzluisf
  • 2,586
  • 1
  • 9
  • 27