fix: fix the bug of upload without global.urlparam.nodeAddr
This commit is contained in:
parent
0b15e58938
commit
79ec02eeb1
@ -646,10 +646,11 @@ var uploadInternal = function () {
|
|||||||
var sign = sm2.doSignature(arg, global.sm2Key.privateKey, {hash: true, der: true});
|
var sign = sm2.doSignature(arg, global.sm2Key.privateKey, {hash: true, der: true});
|
||||||
console.log(sign)
|
console.log(sign)
|
||||||
arg += "&sign=" + sign;
|
arg += "&sign=" + sign;
|
||||||
|
const url = `${global.urlparam && global.urlparam.nodeAddr ?
|
||||||
|
(location.href.startsWith('https') ? 'https://' : 'http://') + global.urlparam.nodeAddr :
|
||||||
|
'.'}/Upload?${arg}`;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `${global.urlparam ?
|
url: url,
|
||||||
(location.href.startsWith('https') ? 'https://' : 'http://') + global.urlparam.nodeAddr :
|
|
||||||
'.'}/Upload?${arg}`,
|
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: fd,
|
data: fd,
|
||||||
processData: false, // tell jQuery not to process the data
|
processData: false, // tell jQuery not to process the data
|
||||||
|
Loading…
Reference in New Issue
Block a user