1.問題描述:
七牛上傳圖片,同樣的回調函數,在測試伺服器上回調報錯,報579錯誤,但是在線上伺服器可以上傳,而且之前在測試伺服器上傳是沒有問題的,一段時間後有問題了。
2.回到函數:
public function qiniuUploadCallback(){
<code> $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'])); }</code>
3.報錯訊息:
<code>"{"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"}"</code>
4.網路上使用解決方法連結:http://blog.csdn.net/guoer997...
1.問題描述:
七牛上傳圖片,同樣的回調函數,在測試伺服器上回調報錯,報579錯誤,但是在線上伺服器可以上傳,而且之前在測試伺服器上傳是沒有問題的,一段時間後有問題了。
2.回到函數:
public function qiniuUploadCallback(){
<code> $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'])); }</code>
3.報錯訊息:
<code>"{"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"}"</code>
4.網路上使用解決方法連結:http://blog.csdn.net/guoer997...
回呼 579 ,是上傳成功但是回呼失敗了,一般有以下幾種情況:
1.網路問題。
2.服務器屏蔽了七牛。
排查時首先確認一下伺服器是否對七牛的 IP 進行了屏蔽,確認沒有問題的話可以將 reqID 和問題描述發給 support@qiniu.com 讓七牛技術支援看一下。