Automation init...3

This commit is contained in:
최준흠 2024-09-14 20:54:31 +09:00
parent a09a24221a
commit 2bb13ba47e

View File

@ -45,6 +45,7 @@ class FileLibrary extends MyStorageLibrary
$fullPath = WRITEPATH . $this->getUploadPath() . DIRECTORY_SEPARATOR . $this->getPath(); $fullPath = WRITEPATH . $this->getUploadPath() . DIRECTORY_SEPARATOR . $this->getPath();
$this->makeDirectory($fullPath); $this->makeDirectory($fullPath);
$saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $this->getOriginName(); $saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $this->getOriginName();
//중복된 파일명인지 확인후 새로운 이름으로 저장
if (file_exists($saveFilePath)) { if (file_exists($saveFilePath)) {
$saveFile = $this->getUniqueFilename($fullPath, $this->getOriginName()); $saveFile = $this->getUniqueFilename($fullPath, $this->getOriginName());
$saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $saveFile; $saveFilePath = $fullPath . DIRECTORY_SEPARATOR . $saveFile;