正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -71,7 +71,7 @@ class FileController | @@ -71,7 +71,7 @@ class FileController | ||
| 71 | $this->response('指定文件不存在!', Code::USER_ERROR); | 71 | $this->response('指定文件不存在!', Code::USER_ERROR); |
| 72 | } | 72 | } |
| 73 | //获取cos链接 | 73 | //获取cos链接 |
| 74 | - if($info['cos'] == 1){ | 74 | + if($info['is_cos'] == 1){ |
| 75 | $cos = new CosService(); | 75 | $cos = new CosService(); |
| 76 | return $cos->getImageUrl($info['path']); | 76 | return $cos->getImageUrl($info['path']); |
| 77 | } | 77 | } |
| @@ -57,7 +57,7 @@ class CosService | @@ -57,7 +57,7 @@ class CosService | ||
| 57 | 'secretKey' => $cos['credentials']['secretKey'], | 57 | 'secretKey' => $cos['credentials']['secretKey'], |
| 58 | ], | 58 | ], |
| 59 | ]); | 59 | ]); |
| 60 | - $imageUrl = $cosClient->getObjectUrl($cos['bucket'], $image_name); | 60 | + $imageUrl = $cosClient->getObjectUrl($cos['bucket'], basename($image_name)); |
| 61 | return $imageUrl; | 61 | return $imageUrl; |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
-
请 注册 或 登录 后发表评论