can I pipe audio stream to multiple files (node js)

Viewed 108

Node server receives a stream of audio buffer, How to save this stream to multiple files every file contain 100 mega of buffer

writeStream = fs.createWriteStream(filename)
(stream).pipe(writeStream)

fs.truncate() and fs.write() don't work with writeStream

1 Answers

You could make a round service on the file or copying the file and truncate the original file to zero.

Related