socket.io-stream
socket.io-stream copied to clipboard
Need help to download zip file on browser
Hello! I've been trying to push a zip file to browser so it could be downloaded by the user. How do i do this with socket.io-stream?
My actual code is this one :
Server:
let stream = socketstream.createStream();
fs
.createReadStream(`${socket.id}.zip`)
.pipe(stream);
socketstream(socket).emit('musics', stream);
Cliente:
var stream = ss.createStream();
stream.on('musics', function(chunk) {
});
Thanks in advance