fix: 첨부파일 저장경로 수정

This commit is contained in:
root
2026-08-27 17:08:43 +09:00
parent ac9a784f7e
commit 5cfa777897
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ if ($isEdit) {
function handle_file_uploads(PDO $pdo, int $postId, array &$errors) {
if (empty($_FILES['attach']['name'][0])) return;
$uploadDir = dirname(__DIR__) . '/uploads/qa';
$uploadDir = dirname(__DIR__) . '/uploads/qa/';
if (!is_dir($uploadDir)) {
if (!mkdir($uploadDir, 0777, true) && !is_dir($uploadDir)) {
$errors[] = '업로드 폴더를 생성할 수 없습니다.';
+1 -1
View File
@@ -65,7 +65,7 @@ if ($isEdit) {
function handle_file_uploads(PDO $pdo, int $postId, array &$errors) {
if (empty($_FILES['attach']['name'][0])) return;
$uploadDir = dirname(__DIR__) . '/uploads/qa';
$uploadDir = dirname(__DIR__) . '/uploads/qa/';
if (!is_dir($uploadDir)) {
if (!mkdir($uploadDir, 0777, true) && !is_dir($uploadDir)) {
$errors[] = 'Upload folder could not be created.';