Closed CapLek closed 2 years ago
In the browser I'm requesting pretty large binary file (~1 Gb) from a server through socket.io stream. It's being streamed by chunks. Is it possible to save it to the file directly not via saving to Blob first?
I've tried it this way and in it didn't work.
const socketStream = reqiure('socket.io-stream') const fileStream = streamSaver.createWriteStream('filename.zip') const targetStream = socketStream.createsStream() // Readable-writable stream socketStream(socket).emit('get-large-file', targetStream) targetStream.pipe(fileStream)
Maybe I'm missing something? Thank you.
In the browser I'm requesting pretty large binary file (~1 Gb) from a server through socket.io stream. It's being streamed by chunks. Is it possible to save it to the file directly not via saving to Blob first?
I've tried it this way and in it didn't work.
Maybe I'm missing something? Thank you.