1. problem Description: Qiniu uploads an image. The same callback function reports an error in callback on the test server. the error 579 is returned, but the server can upload the image online, in addition, there was no problem with uploading data on the test server. 2. return to the function: publicfunctionqiniuU... 1. problem description:
Qiniu uploads an image. The same callback function reports an error in callback on the test server and reports a 579 error. However, the online server can upload the image, and the upload on the test server is normal, A problem may occur after a while.
2. return to the function:
Public function qiniuUploadCallback (){
$data['key'] = $_POST['filetype']; $data['name'] = $_POST['fname']; $data['size'] = $_POST['fsize']; $data['module'] = $_POST['module']; $data['savename'] = $_POST['key']; $data['create_time'] = time(); $data['width'] = $_POST['w']; $data['height'] = $_POST['h']; $data['type'] = ''; $data['status'] = 1; $data['record_id'] = $data['user_id'] = 0; $id = M('Attach')->add($data); $this->ajaxReturn(array('id'=>$id,'w'=>$_POST['w'],'h'=>$_POST['h'],'key'=>$_POST['key'],'fsize'=>$_POST['fsize']));}
3. error message:
"{"callback_url":"http://aaabbb.com/public/qiniuUploadCallback","callback_bodyType":"application/x-www-form-urlencoded","callback_body":"key=SchoolWeddingCover%2FFnBXIAKagMtKjkCdQDVvhjq5FqGM.png\u0026w=18\u0026h=30\u0026fname=btn_arrow%403x.png\u0026fsize=1365\u0026filetype=\u0026video=\u0026module=SchoolWeddingCover","token":"","err_code":200,"error":"unexpected response","hash":"FnBXIAKagMtKjkCdQDVvhjq5FqGM","key":"SchoolWeddingCover/FnBXIAKagMtKjkCdQDVvhjq5FqGM.png"}"
4. online use Solution links: http://blog.csdn.net/guoer997...
Reply content:
1. problem description:
Qiniu uploads an image. The same callback function reports an error in callback on the test server and reports a 579 error. However, the online server can upload the image, and the upload on the test server is normal, A problem may occur after a while.
2. return to the function:
Public function qiniuUploadCallback (){
$data['key'] = $_POST['filetype']; $data['name'] = $_POST['fname']; $data['size'] = $_POST['fsize']; $data['module'] = $_POST['module']; $data['savename'] = $_POST['key']; $data['create_time'] = time(); $data['width'] = $_POST['w']; $data['height'] = $_POST['h']; $data['type'] = ''; $data['status'] = 1; $data['record_id'] = $data['user_id'] = 0; $id = M('Attach')->add($data); $this->ajaxReturn(array('id'=>$id,'w'=>$_POST['w'],'h'=>$_POST['h'],'key'=>$_POST['key'],'fsize'=>$_POST['fsize']));}
3. error message:
"{"callback_url":"http://aaabbb.com/public/qiniuUploadCallback","callback_bodyType":"application/x-www-form-urlencoded","callback_body":"key=SchoolWeddingCover%2FFnBXIAKagMtKjkCdQDVvhjq5FqGM.png\u0026w=18\u0026h=30\u0026fname=btn_arrow%403x.png\u0026fsize=1365\u0026filetype=\u0026video=\u0026module=SchoolWeddingCover","token":"","err_code":200,"error":"unexpected response","hash":"FnBXIAKagMtKjkCdQDVvhjq5FqGM","key":"SchoolWeddingCover/FnBXIAKagMtKjkCdQDVvhjq5FqGM.png"}"
4. online use Solution links: http://blog.csdn.net/guoer997...
Callback 579 indicates that the upload is successful but the callback fails. Generally, the following conditions are met:
1. network problems.
2. the server shields Qiniu.
During troubleshooting, first confirm whether the server has blocked the IP address of Qiniu. if there is no problem, you can send the reqID and problem description to the support@qiniu.com to let Qiniu technical support take a look.