try fix upload

pull/217/head
qkqpttgf 2021-01-26 09:17:47 +08:00 committed by GitHub
parent 38bd4e4041
commit 9987651af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -807,6 +807,7 @@
return; return;
} }
upbigfilename = encodeURIComponent((file.webkitRelativePath||file.name)); upbigfilename = encodeURIComponent((file.webkitRelativePath||file.name));
var filemd5='';
<!--GuestStart--> <!--GuestStart-->
function getext(str) { function getext(str) {
strarry=str.split('.'); strarry=str.split('.');
@ -843,7 +844,7 @@
<!--GuestEnd--> <!--GuestEnd-->
td2.innerHTML='<!--constStr@GetUploadLink--> ...'; td2.innerHTML='<!--constStr@GetUploadLink--> ...';
var xhr1 = new XMLHttpRequest(); var xhr1 = new XMLHttpRequest();
xhr1.open("GET", '?action=upbigfile&upbigfilename='+ upbigfilename +'&filesize='+ file.size +'&lastModified='+ file.lastModified); xhr1.open("POST", '?action=upbigfile');
xhr1.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr1.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr1.onprogress = function(e){ xhr1.onprogress = function(e){
td2.innerHTML+='.'; td2.innerHTML+='.';
@ -878,7 +879,7 @@
getuplink(i); getuplink(i);
} }
} }
xhr1.send(null); xhr1.send('upbigfilename='+ upbigfilename +'&filesize='+ file.size +'&filelastModified='+ file.lastModified +'&filemd5='+ filemd5);
<!--GuestStart--> <!--GuestStart-->
} }
} }