fix: guest upload error when hide login btn
parent
cb0cf8f8e4
commit
f5eaea3917
|
@ -877,19 +877,19 @@
|
||||||
reader.readAsArrayBuffer(blob);
|
reader.readAsArrayBuffer(blob);
|
||||||
}
|
}
|
||||||
readblob(asize);
|
readblob(asize);
|
||||||
<!--LoginStart-->
|
<!--GuestStart-->
|
||||||
var spark = new SparkMD5.ArrayBuffer();
|
var spark = new SparkMD5.ArrayBuffer();
|
||||||
<!--LoginEnd-->
|
<!--GuestEnd-->
|
||||||
reader.onload = function(e){
|
reader.onload = function(e){
|
||||||
var binary = this.result;
|
var binary = this.result;
|
||||||
<!--LoginStart-->
|
<!--GuestStart-->
|
||||||
spark.append(binary);
|
spark.append(binary);
|
||||||
if (asize < newstartsize) {
|
if (asize < newstartsize) {
|
||||||
asize += chunksize;
|
asize += chunksize;
|
||||||
readblob(asize);
|
readblob(asize);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
<!--LoginEnd-->
|
<!--GuestEnd-->
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("PUT", url, true);
|
xhr.open("PUT", url, true);
|
||||||
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
|
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
|
||||||
|
@ -916,7 +916,7 @@
|
||||||
xhr3.onload = function(e){
|
xhr3.onload = function(e){
|
||||||
console.log(xhr3.responseText+','+xhr3.status);
|
console.log(xhr3.responseText+','+xhr3.status);
|
||||||
}
|
}
|
||||||
<!--LoginStart-->
|
<!--GuestStart-->
|
||||||
var filemd5 = spark.end();
|
var filemd5 = spark.end();
|
||||||
var xhr4 = new XMLHttpRequest();
|
var xhr4 = new XMLHttpRequest();
|
||||||
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
|
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
|
||||||
|
@ -941,7 +941,7 @@
|
||||||
document.getElementById('upfile_a1_'+tdnum).href = filename;
|
document.getElementById('upfile_a1_'+tdnum).href = filename;
|
||||||
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
|
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
|
||||||
}
|
}
|
||||||
<!--LoginEnd-->
|
<!--GuestEnd-->
|
||||||
EndTime=new Date();
|
EndTime=new Date();
|
||||||
MiddleStr = '<!--constStr@EndAt-->:'+EndTime.toLocaleString()+'<br>';
|
MiddleStr = '<!--constStr@EndAt-->:'+EndTime.toLocaleString()+'<br>';
|
||||||
if (newstartsize==0) {
|
if (newstartsize==0) {
|
||||||
|
|
Loading…
Reference in New Issue