1. Description of the problem:
Seven cattle upload pictures, the same callback function, on the test server callback error, reported 579 errors, but the online server can upload, and before the test server upload is no problem, a period of time after the problem.
2. Return to 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 solution Link: http://blog.csdn.net/guoer997 ...
Reply content:
1. Description of the problem:
Seven cattle upload pictures, the same callback function, on the test server callback error, reported 579 errors, but the online server can upload, and before the test server upload is no problem, a period of time after the problem.
2. Return to 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 solution Link: http://blog.csdn.net/guoer997 ...
Callback 579, the upload is successful but the callback failed, generally have the following situations:
1. Network problems.
2. The server shielded seven cows.
Troubleshooting the first to confirm that the server is seven of the IP Shield, confirm that there is no problem can be reqID and problem description to support@qiniu.com let seven cattle technical support to see.