正在显示
1 个修改的文件
包含
7 行增加
和
1 行删除
| @@ -459,7 +459,13 @@ if (!function_exists('getFileUrl')) { | @@ -459,7 +459,13 @@ if (!function_exists('getFileUrl')) { | ||
| 459 | $fileModel = new File(); | 459 | $fileModel = new File(); |
| 460 | $info = $fileModel->read(['hash'=>$hash]); | 460 | $info = $fileModel->read(['hash'=>$hash]); |
| 461 | if(!empty($info)){ | 461 | if(!empty($info)){ |
| 462 | - $url = url('a/file/'.$info['hash']); | 462 | + if($info['is_cos'] == 1){ |
| 463 | + $cos = config('filesystems.disks.cos'); | ||
| 464 | + $cosCdn = $cos['cdn']; | ||
| 465 | + $url = $cosCdn.$info['path']; | ||
| 466 | + }else{ | ||
| 467 | + $url = url('a/file/'.$info['hash']); | ||
| 468 | + } | ||
| 463 | }else{ | 469 | }else{ |
| 464 | $url = $hash; | 470 | $url = $hash; |
| 465 | } | 471 | } |
-
请 注册 或 登录 后发表评论