|
|
@@ -269,7 +269,7 @@ function upload_read_event(e) { |
|
|
|
url: conf.openapi + "/documents/" + temp.documentid + "/data", |
|
|
|
data: e.target.result, |
|
|
|
contentType: temp.upload[e.data].obj.type, |
|
|
|
context: { id: 0 + (function() { var x = e.data; console.log("upload_id", x); return x; }()) }, |
|
|
|
context: { id: 0 + (function () { var x = e.data; console.log("upload_id", x); return x; }()) }, |
|
|
|
processData: false, |
|
|
|
xhr: function () { |
|
|
|
var xhr = $.ajaxSettings.xhr(); |
|
|
@@ -279,7 +279,7 @@ function upload_read_event(e) { |
|
|
|
if (evt.lengthComputable) { |
|
|
|
var progress = Math.floor(evt.loaded / evt.total * 50); |
|
|
|
if (progress < 1) { progress = 1; } |
|
|
|
if (progress > 49) { progress = 50; } |
|
|
|
if (progress > 49) { progress = 49; } |
|
|
|
temp.upload[id].progress = 50 + progress; |
|
|
|
// console.log("upload_progress_event", evt); |
|
|
|
} |
|
|
@@ -289,8 +289,7 @@ function upload_read_event(e) { |
|
|
|
}, |
|
|
|
success: function (data, status, xhr) { |
|
|
|
console.log("upload_success_this", this); |
|
|
|
//var ctx = this.context; |
|
|
|
//temp.upload[this.context].progress = 100; |
|
|
|
temp.upload[this.id].progress = 100; |
|
|
|
|
|
|
|
} |
|
|
|
}); |