An error occurred while uploading the image callback. The same callback function only changed the domain name. The online server can. the test server reports an error and the error 579 is returned. why?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.