diff --git a/theme/classic.html b/theme/classic.html
index 0be7935..4178de8 100644
--- a/theme/classic.html
+++ b/theme/classic.html
@@ -839,6 +839,7 @@
document.getElementById('upload_submit').style.display='';
document.getElementById('upload_file').style.display='';*/
}
+ var uploading = new Object();
function preup() {
@@ -853,7 +854,15 @@
table1.setAttribute('class','list-table');
var timea=new Date().getTime();
var i=0;
- getuplink(i);
+ var uploadList = setInterval(function(){
+ if (i
function getext(str) {
@@ -927,15 +937,6 @@
xhr1.onload = function(e){
//console.log(xhr1.status+xhr1.responseText);
td2.innerHTML=''+xhr1.responseText+'';
- if (xhr1.status==409) {
- // td2.innerHTML='nameAlreadyExists';
- var html=JSON.parse(xhr1.responseText);
- td2.innerHTML=html['error']['code']+': '+html['error']['message'];
-
- td2.innerHTML='md5: '+filemd5;
-
- td1.innerHTML='';
- }
if (xhr1.status==200) {
if (xhr1.responseText=='') {
getuplink(i,1);
@@ -948,10 +949,21 @@
td2.innerHTML=' ...';
binupfile(file,html['uploadUrl'],timea+'_'+i, upbigfilename);
}
- }
- if (i
+ td2.innerHTML='md5: '+filemd5;
+
+ td1.innerHTML='';
+ }
+ /*if (i:'+size_format((totalsize-newstartsize)*1000/(EndTime.getTime()-StartTime.getTime()))+'/s
';
}
+ delete uploading[filename];
while (filename.indexOf('%2F')>0) filename = filename.replace('%2F', '/');
document.getElementById('upfile_td1_'+tdnum).innerHTML='';
label.innerHTML=StartStr+MiddleStr;
label.style.color='green';
+
// uploadbuttonshow();
response.name=file.webkitRelativePath||response.name;
@@ -1048,6 +1062,7 @@
} else {
if (!response['nextExpectedRanges']) {
label.innerHTML=''+xhr.responseText+'
';
+ delete uploading[filename];
} else {
var a=response['nextExpectedRanges'][0];
asize=Number( a.slice(0,a.indexOf("-")) );
@@ -1063,6 +1078,7 @@
} else {
label.innerHTML=''+xhr2.responseText+'';
}
+ delete uploading[filename];
// uploadbuttonshow();
}
}
@@ -1082,7 +1098,15 @@
table1.setAttribute('class','list-table');
var timea=new Date().getTime();
var i=0;
- getuplink(i);
+ var uploadList = setInterval(function(){
+ if (i
- while (upbigfilename.indexOf('%2F')>0) upbigfilename = upbigfilename.replace('%2F', '/');
+ //while (upbigfilename.indexOf('%2F')>0) upbigfilename = upbigfilename.replace('%2F', '/');
td2.innerHTML=' ...';
var html = JSON.parse(localStorage.getItem(filesha1));
//console.log(html);
@@ -1174,17 +1199,20 @@
} else {
td2.innerHTML=''+xhr1.responseText+'
';
}
+ delete uploading[upbigfilename];
} else {
td2.innerHTML=' ...';
//console.log(html);
localStorage.setItem(filesha1, JSON.stringify(html));
binupfile(file, html, timea+'_'+i, upbigfilename, filesha1, chunksize);
}
+ } else {
+ delete uploading[upbigfilename];
}
- if (i';
localStorage.removeItem(filesha1);
}
+ delete uploading[filename];
}
xhr1.send('uploadid=' + uploadid + '&fileid=' + fileid + '&etag=' + JSON.stringify(res['ETag']));
} else {
@@ -1340,6 +1369,7 @@
label.innerHTML= '' + xhr1.status + ',' + xhr1.responseText + '';
localStorage.removeItem(filesha1);
}
+ delete uploading[filename];
}
xhr1.send('uploadid=' + uploadid + '&fileid=' + fileid + '&etag=' + JSON.stringify(res['ETag']));
// uploadbuttonshow();
@@ -1357,6 +1387,8 @@
chunknum++;
asize += chunksize;
readblob(asize);
+ } else {
+ delete uploading[filename];
}
//label.innerHTML=''+xhr.responseText+'
';
} } else readblob(asize);