This commit is contained in:
mkm 2023-11-12 16:48:10 +08:00
parent d2bb96446f
commit f8b9c0ec98

View File

@ -42,10 +42,10 @@ abstract class Server
} }
// 校验上传文件后缀 // 校验上传文件后缀
$limit = array_merge(config('project.file_image'), config('project.file_video')); // $limit = array_merge(config('project.file_image'), config('project.file_video'));
if (!in_array(strtolower($this->file->extension()), $limit)) { // if (!in_array(strtolower($this->file->extension()), $limit)) {
throw new Exception('不允许上传' . $this->file->extension() . '后缀文件'); // throw new Exception('不允许上传' . $this->file->extension() . '后缀文件');
} // }
// 文件信息 // 文件信息
$this->fileInfo = [ $this->fileInfo = [