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);