From 6f6d3ecc7de5f6c022d59eb0292d54c68a4412c3 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Tue, 13 May 2025 18:11:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E4=BA=A4=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/FileController.php | 2 +- app/common/service/FileServer.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/controller/FileController.php b/app/api/controller/FileController.php index 76aa6f8..15cee7f 100644 --- a/app/api/controller/FileController.php +++ b/app/api/controller/FileController.php @@ -43,7 +43,7 @@ class FileController extends BaseApiController public function formImage() { $data = FileServer::userFormImage($this->userId); - if($data['cd'] == 0){ + if($data['cd'] == 1){ return $this->success("操作成功",$data); }else{ return $this->fail("操作失败"); diff --git a/app/common/service/FileServer.php b/app/common/service/FileServer.php index 34fd601..e76ba05 100644 --- a/app/common/service/FileServer.php +++ b/app/common/service/FileServer.php @@ -118,9 +118,9 @@ class FileServer $fileInfo = $StorageDriver->getFileInfo(); // 验证是否是图片文件 - if (! check_is_image($StorageDriver->getFileInfo()['name'] ?? '')) { - throw new Exception('不是有效的图像文件'); - } +// if (! check_is_image($StorageDriver->getFileInfo()['name'] ?? '')) { +// throw new Exception('不是有效的图像文件'); +// } // 校验上传文件后缀 $ext = pathinfo($fileInfo['name'], PATHINFO_EXTENSION);