I'm hacking on a Node program that uses smtp-protocol to capture SMTP emails and act on the mail data. The library provides the mail data as a stream, and I don't know how to get that into a string.  I'm currently writing it to stdout wit...
I am trying to write a program to get a zip file from s3, unzip it, then upload it to S3. But I found two exceptions that I can not catch.  1. StreamContentLengthMismatch: Stream content length mismatch. Received 980323883 of 5770104761 bytes. This o...
I am developing a File Uploader for big file. Upload from HTML script and send by byte from Javascript using ArrayBuffer and Unit8Array to PHP. The PHP script will stream the file and save it into folder.  Here's my Javascript looks like  functio...
In Java it is possible to declare and fold infinite streams as so  List<Integer> collect = Stream.iterate(0, i -> i + 2)     .map(i -> i * 3)     .filter(i -> i % 2 == 0)     .limit(10)     .collect(Collectors.toList());  // -> [0,...
I'm trying to write two files and some more text to a response. The code below does however only return the first file and the "Thats all!" text.  var http = require('http'),     util = require('util'),     fs   = require(...
Dear friends I am trying to build test application which allows to connect a browser window to itself (streming video data from user's camera).The final result is to get two video streams on the page, one coming from the camera directly and the o...
i'm fetching some binary data over http. My code looks like:  var writeStream = fs.createWriteStream(fileName); request(url, function(err, res) {     res.socket.pipe(writeStream); });   now the output file is created but the filesize is 0. The ur...
I have been experimenting with RxJS for two weeks now, and although I love it in principle I just cannot seem to find and implement the correct pattern for managing state. All articles and questions appear to agree:   Subject should be avoided where...
I'm using node v0.12.7 and want to stream directly from a database to the client (for file download). However, I am noticing a large memory footprint (and possible memory leak) when using streams.  With express, I create an endpoint that simply p...
I'm reading a stream, which is tested with a regex:   var deviceReadStream = fs.createReadStream("/path/to/stream");  deviceReadStream.on('data',function(data){   if( data.match(aRegex) )     //do something });   But as the stream...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.