It will also do some cosmetic work, creating an array of progress nodes in the DOM. As each XHR object is created, the stream is opened and the file is sent along it. up.uploadFile = function(file, index) {// create the empty XHR objects and some nodes, cached by index. up.xhr = []; up.xhr[index] = new XMLHttpRequest(); up.progressNode = []; up.progressNode[index] = $(' Progress for ' + file.name + ': '); up.progressNode[index].appendTo('#progressContainer'); // of the various pieces of data available, let's just use the "loaded" (in bytes) // and the "total" (in bytes) to generate a percentage of progress.
up.uploadFile = មុខងារ (ឯកសារ, លិបិក្រម) {// បង្កើតវត្ថុ XHR ទទេនិងថ្នាំងមួយចំនួនដែលលាក់ទុកដោយសន្ទស្សន៍។ up.xhr = []; up.xhr [សន្ទស្សន៍] = XMLHttpRequest ថ្មី (); up.progressNode = []; up.progressNode [សន្ទស្សន៍] = $ ('