This commit is contained in:
toom1996
2025-07-02 16:54:12 +08:00
parent 176e6afae7
commit 21de56d967

View File

@ -82,7 +82,7 @@ class UploadController extends AbstractController
// 保存路径 // 保存路径
$filename = uniqid() . '.' . pathinfo($file->getClientFilename(), PATHINFO_EXTENSION); $filename = uniqid() . '.' . pathinfo($file->getClientFilename(), PATHINFO_EXTENSION);
$targetPath = BASE_PATH . '/public/uploads/' . $filename; $targetPath = BASE_PATH . '/uploads/' . $filename;
// 确保目录存在 // 确保目录存在
if (!is_dir(dirname($targetPath))) { if (!is_dir(dirname($targetPath))) {