From 2bb13ba47e039304510e96732f924c86860012fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Sat, 14 Sep 2024 20:54:31 +0900 Subject: [PATCH] Automation init...3 --- app/Libraries/MyStorage/FileLibrary.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Libraries/MyStorage/FileLibrary.php b/app/Libraries/MyStorage/FileLibrary.php index 6cb0b75..379a149 100644 --- a/app/Libraries/MyStorage/FileLibrary.php +++ b/app/Libraries/MyStorage/FileLibrary.php @@ -45,6 +45,7 @@ class FileLibrary extends MyStorageLibrary $fullPath = WRITEPATH . $this->getUploadPath() . DIRECTORY_SEPARATOR . $this->getPath(); $this->makeDirectory($fullPath); $saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $this->getOriginName(); + //중복된 파일명인지 확인후 새로운 이름으로 저장 if (file_exists($saveFilePath)) { $saveFile = $this->getUniqueFilename($fullPath, $this->getOriginName()); $saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $saveFile;