Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js file upload capabilities: Large Video Files Uploading with support for interruption

Tags:

node.js

Is there a way to upload large movie file (around 5GB) and at some point interrupt the upload process, log out and come back to the website to resume de upload after 2/3 hours?

Of course, resume should be made from the same computer and referencing the same file.

like image 392
Lothre1 Avatar asked Mar 28 '26 01:03

Lothre1


1 Answers

It's doable using socket.io, and the HTML5 filereader API. With the filereader API you can slice and dice your video file in smaller chunks and then send those through web sockets to Node.js. Because this chunks are well defined and enumerable, you can resume the upload whenever you want as long as the server keeps track of the current chunks downloaded. You may find this interesting tutorial very similar to what your asking for.

like image 147
danielepolencic Avatar answered Mar 29 '26 15:03

danielepolencic