This commit is contained in:
toom1996
2025-06-18 15:12:42 +08:00
parent ce68974b58
commit 2f985d9f6f
3 changed files with 15 additions and 2 deletions

View File

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