1.提交缺失的东西

This commit is contained in:
2025-05-13 18:11:49 +08:00
parent 0f50a4c7f1
commit 6f6d3ecc7d
2 changed files with 4 additions and 4 deletions

View File

@ -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("操作失败");

View File

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