【程序目录】更新

This commit is contained in:
吴昊天 2026-07-09 09:42:58 +08:00
parent 1b67bf8098
commit cc5ba5aa0b

View File

@ -130,9 +130,9 @@ class Local extends BaseUpload
return $this->setError('不支持的文件格式');
}
// 对所有上传文件进行内容安全检测
if ($this->checkFileContent($fileHandle) === false) {
return false;
}
// if ($this->checkFileContent($fileHandle) === false) {
// return false;
// }
if (in_array($fileHandle->getOriginalMime(), ['image/x-icon', 'image/png', 'image/gif', 'image/jpeg', 'image/jpg', 'image/webp'])) {
$stream = fopen($fileHandle->getPathname(), 'r');
$content = (fread($stream, filesize($fileHandle->getPathname())));