This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 + '"'); |