正在显示
2 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -180,6 +180,7 @@ class FileController | @@ -180,6 +180,7 @@ class FileController | ||
| 180 | $is_cos = 1;//上传到cos | 180 | $is_cos = 1;//上传到cos |
| 181 | $cosService->uploadFile($files,$this->path,$fileName); | 181 | $cosService->uploadFile($files,$this->path,$fileName); |
| 182 | }else{ | 182 | }else{ |
| 183 | + $is_cos = 0; | ||
| 183 | $res = $files->move($url,$fileName); | 184 | $res = $files->move($url,$fileName); |
| 184 | if ($res === false) { | 185 | if ($res === false) { |
| 185 | return $this->response($files->getError(), Code::USER_ERROR); | 186 | return $this->response($files->getError(), Code::USER_ERROR); |
| @@ -165,6 +165,7 @@ class ImageController extends Controller | @@ -165,6 +165,7 @@ class ImageController extends Controller | ||
| 165 | $cosService->uploadFile($files,$this->path,$fileName); | 165 | $cosService->uploadFile($files,$this->path,$fileName); |
| 166 | }else{ | 166 | }else{ |
| 167 | $res = $files->move($url,$fileName); | 167 | $res = $files->move($url,$fileName); |
| 168 | + $is_cos = 0;//上传到cos | ||
| 168 | if ($res === false) { | 169 | if ($res === false) { |
| 169 | return $this->response($files->getError(), Code::USER_ERROR); | 170 | return $this->response($files->getError(), Code::USER_ERROR); |
| 170 | } | 171 | } |
-
请 注册 或 登录 后发表评论