|
|
@@ -249,7 +249,6 @@ function upload_read_event(e) { |
|
|
|
} |
|
|
|
} |
|
|
|
else if ( e.type == 'load' ) { |
|
|
|
var xhr = new XMLHttpRequest(); |
|
|
|
|
|
|
|
temp.upload[e.data]['progress'] = 50; |
|
|
|
|
|
|
@@ -258,15 +257,16 @@ function upload_read_event(e) { |
|
|
|
url: conf.openapi + "/documents/" + temp.documentid + "/data", |
|
|
|
data: e.target.result, |
|
|
|
context: e.data, |
|
|
|
beforeSend: function(XMLHttpRequest) |
|
|
|
xhr: function() |
|
|
|
{ |
|
|
|
XMLHttpRequest.upload.addEventListener("progress", function(evt){ |
|
|
|
var xhr = new window.XMLHttpRequest(); |
|
|
|
xhr.upload.addEventListener("progress", function(evt){ |
|
|
|
if (evt.lengthComputable) { |
|
|
|
var percentComplete = evt.loaded / evt.total; |
|
|
|
console.log("upload_progress_event", evt); |
|
|
|
} |
|
|
|
}, false); |
|
|
|
|
|
|
|
return xhr; |
|
|
|
}, |
|
|
|
success: function(data){ |
|
|
|
console.log("upload_complete",data); |