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;
 | 
				
			||||||
    $.ajax({
 | 
					    const url = `${global.urlparam && global.urlparam.nodeAddr ?
 | 
				
			||||||
        url: `${global.urlparam ?
 | 
					 | 
				
			||||||
        (location.href.startsWith('https') ? 'https://' : 'http://') + global.urlparam.nodeAddr :
 | 
					        (location.href.startsWith('https') ? 'https://' : 'http://') + global.urlparam.nodeAddr :
 | 
				
			||||||
            '.'}/Upload?${arg}`,
 | 
					        '.'}/Upload?${arg}`;
 | 
				
			||||||
 | 
					    $.ajax({
 | 
				
			||||||
 | 
					        url: url,
 | 
				
			||||||
        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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user