瀏覽代碼

debug

master
Pascal Gloor 6 年之前
父節點
當前提交
cb0d6503d7
共有 1 個檔案被更改,包括 5 行新增4 行删除
  1. 5
    4
      www/js/autodoc.js

+ 5
- 4
www/js/autodoc.js 查看文件

processData: false, processData: false,
xhr: function() xhr: function()
{ {
var xhr = new window.XMLHttpRequest();
xhr.upload['data'] = e.data;
xhr.upload.addEventListener("progress", function(evt){
var xhr = $.ajaxSettings.xhr();
$(xhr.upload).on('progress', e.data, function(evt) {
// xhr.upload.addEventListener("progress", function(evt){
if (evt.lengthComputable) { if (evt.lengthComputable) {
var progress = Math.floor(evt.loaded / evt.total * 50); var progress = Math.floor(evt.loaded / evt.total * 50);
if ( progress < 1 ) { progress = 1; } if ( progress < 1 ) { progress = 1; }
if ( progress > 49 ) { progress = 49; } if ( progress > 49 ) { progress = 49; }
console.log("upload_progress_event", evt); console.log("upload_progress_event", evt);
} }
}, false);
});
//}, false);
return xhr; return xhr;
}, },
success: function(data, status, xhr){ success: function(data, status, xhr){

Loading…
取消
儲存