try fix upload

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

View File

@ -849,6 +849,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('.');
@ -885,7 +886,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+='.';
@ -920,7 +921,7 @@
getuplink(i); getuplink(i);
} }
} }
xhr1.send(null); xhr1.send('upbigfilename='+ upbigfilename +'&filesize='+ file.size +'&filelastModified='+ file.lastModified +'&filemd5='+ filemd5);
<!--GuestStart--> <!--GuestStart-->
} }
} }