Skip to content

Instantly share code, notes, and snippets.

function UploadVideo(file) {
var loaded = 0;
var chunkSize = 500000;
var total = file.size;
var reader = new FileReader();
var slice = file.slice(0, chunkSize);
// Reading a chunk to invoke the 'onload' event
reader.readAsBinaryString(slice);
console.log('Started uploading file "' + file.name + '"');