Skip to content
Permalink
Browse files

Fix: error message for oss

  • Loading branch information...
HFO4 committed Sep 10, 2019
1 parent 59f9428 commit 03320a9986970b0ffdf2e195299b42cc0c1c1a15
@@ -24,6 +24,7 @@ public function Qiniu(){
}
public function Oss(){
//trace('日志信息OSS','error');
ob_end_clean();
header('Content-Type: application/json');
$handllerObj = new CallbackHandler(file_get_contents("php://input"));
@@ -1518,6 +1518,11 @@ plupload.Uploader = function(options) {
return;
}

if (xhr.status == 203) {
handleError();
return;
}

retries = up.settings.max_retries; // reset the counter

// Handle chunk response
@@ -1302,14 +1302,15 @@ function QiniuJsSDK() {
}
if(uploadConfig.saveType == "oss"){
var str = err.response
var a = $.parseXML(str);
$(a).find('Error').each(function () {
errTip = $(this).children('Message').text();
var errorText = "Error";
});
if(err.status == 203){
errTip = "上传失败,请检查空间容量、是否重名";
try {
parser=new DOMParser();
xmlDoc=parser.parseFromString(str,"text/xml");
}catch(e) {
errTip = "未知错误";
var errorText = "Error";
}
errTip = "回调失败";
var errorText = xmlDoc.getElementsByTagName("Message")[0].innerHTML;
}else if(uploadConfig.saveType == "s3" && err.status!=401){
var str = err.response
parser = new DOMParser();

0 comments on commit 03320a9

Please sign in to comment.
You can’t perform that action at this time.