作者 lyh

gx

... ... @@ -71,7 +71,7 @@ class FileController
$this->response('指定文件不存在!', Code::USER_ERROR);
}
//获取cos链接
if($info['cos'] == 1){
if($info['is_cos'] == 1){
$cos = new CosService();
return $cos->getImageUrl($info['path']);
}
... ...
... ... @@ -57,7 +57,7 @@ class CosService
'secretKey' => $cos['credentials']['secretKey'],
],
]);
$imageUrl = $cosClient->getObjectUrl($cos['bucket'], $image_name);
$imageUrl = $cosClient->getObjectUrl($cos['bucket'], basename($image_name));
return $imageUrl;
}
}
... ...