作者 lyh

gx

... ... @@ -165,7 +165,7 @@ class ImageController extends Controller
if ($rs === false) {
return $this->response('添加失败', Code::USER_ERROR);
}
return $this->uploadCos($this->path,$files->getClientOriginalExtension());
return $this->uploadCos($this->path,$fileName);
return $this->response('图片资源',Code::SUCCESS,['image'=>$hash]);
}
... ... @@ -327,8 +327,8 @@ class ImageController extends Controller
* @method :post
* @time :2023/7/18 17:38
*/
public function uploadCos($path,$image_type){
public function uploadCos($path,$fileName){
$txCos = new TencentCosService();
return $txCos->upload_image($path,$image_type);
return $txCos->upload_image($path,$fileName);
}
}
... ...