作者 lyh

gx

... ... @@ -167,7 +167,7 @@ class ImageController extends Controller
return $this->response('添加失败', Code::USER_ERROR);
}
$cosService = new CosService();
$cosService->uploadFile($files,$this->path,$fileName);
$cosService->uploadFile($this->path,$fileName);
return $this->response('图片资源',Code::SUCCESS,['image'=>$hash]);
}
... ...
... ... @@ -20,7 +20,7 @@ class CosService
* @method :post
* @time :2023/7/19 15:28
*/
public function uploadFile($file,$path,$filename)
public function uploadFile($path,$filename)
{
$cos = config('filesystems.disks.cos');
$cosClient = new Client([
... ...