Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I upload a file and append it to the previous one? #97

Open
SalvatoreAD opened this issue Dec 6, 2016 · 0 comments
Open

Can I upload a file and append it to the previous one? #97

SalvatoreAD opened this issue Dec 6, 2016 · 0 comments

Comments

@SalvatoreAD
Copy link

Hi, I'm trying to save the blob files in a given interval on the server and link them to create a single file.

The scenario is this: A video conference with 5 participants, the conference is being recorded every 60 seconds and loads the blob on the server and chained to the previous to create 5 files (one for each participant)

On the client side:

var stream = ss.createStream(); ss(socket).emit('file:add:stream', stream, elem, roomId); var blobReadStream = ss.createBlobReadStream(video); console.debug(blobReadStream); blobReadStream.pipe(stream); console.debug(stream); ss(socket).on('file:add:stream:success', function(data) { console.info('file uploaded to server'); });

The server side:

ss(socket).on("file:add:stream", function(stream, data, roomId) { console.log(stream); var dataStream = fs.createWriteStream('./public/uploads/'+roomId+"/"+data+".webm", { 'flags': 'a' }); stream.pipe(dataStream); ss(socket).emit('file:add:stream:success'); });

Can you help me figure out the error? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant