作者 lyh

gx

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