socket.io-stream icon indicating copy to clipboard operation
socket.io-stream copied to clipboard

Need help to download zip file on browser

Open igorsantana opened this issue 9 years ago • 0 comments

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

igorsantana avatar Oct 04 '15 07:10 igorsantana