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
I intend to output the stream to string using concat-stream instead of writing to file system, but it doesn't seems to work. below is the sample code:-
letconcat=require('concat-stream');
...
.then(streamResult=>{// using the length property you can do things like// directly upload the image to s3 by using the// stream and length propertiesstreamResult.stream// => Stream objectstreamResult.length// => Integer length of streamletimgStr='';letcs=concat(buffer=>{imgStr=buffer.toString('base64');console.log(imgStr);});streamResult.stream.pipe(cs);// write to a file// return chartNode.writeImageToFile('image/png', './testimage.png');}).then(()=>{// chart is now written to the file path// ./testimage.png});
I am new to javascript and stream, and hope someone can give me a pointer. Thanks!
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @andrewspy looks like we aren't closing the ReadableStream we're providing you. PR #15 will fix this. I'll have a new package out shortly.
I intend to output the stream to string using
concat-stream
instead of writing to file system, but it doesn't seems to work. below is the sample code:-I am new to javascript and stream, and hope someone can give me a pointer. Thanks!
The text was updated successfully, but these errors were encountered: