From 00d313ecdda02076828c00580ce711b89d32ebbb Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 27 Apr 2022 18:41:37 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8C=8C=EC=9D=BC=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EA=B2=BD=EB=A1=9C=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xit/biz/cmm/service/impl/CmmFileService.java | 6 +++--- .../java/com/xit/biz/ctgy/service/impl/CtgyFileService.java | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/xit/biz/cmm/service/impl/CmmFileService.java b/src/main/java/com/xit/biz/cmm/service/impl/CmmFileService.java index eb7a7f4..417e672 100644 --- a/src/main/java/com/xit/biz/cmm/service/impl/CmmFileService.java +++ b/src/main/java/com/xit/biz/cmm/service/impl/CmmFileService.java @@ -42,7 +42,7 @@ public class CmmFileService implements ICmmFileService { String makePath = ""; if(files != null && files.length > 0){ - makePath = File.separator + DateUtil.getToday(""); + //makePath = File.separator + DateUtil.getToday(""); // 파일 경로 : upload root 제외 String urlPath = uploadPath + makePath; @@ -64,10 +64,10 @@ public class CmmFileService implements ICmmFileService { //Files.copy(multipartFile.getInputStream(), copyOfLocation, StandardCopyOption.REPLACE_EXISTING); } catch (IOException e) { - String errMsg = String.format("File Upload Error :: %s", orgFileName); + String errMsg = String.format("File Upload Error :: %s[ %s ]", e.getLocalizedMessage(), orgFileName); //TODO : 에러처리 //return RestError.of(String.format("File Upload Error :: %s", orgFileName)); - AssertUtils.isTrue(false, String.format("File Upload Error :: %s", orgFileName)); + AssertUtils.isTrue(false, errMsg); } } } diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java b/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java index 8f9edcb..89fccd4 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java @@ -70,9 +70,10 @@ public class CtgyFileService implements ICtgyFileService { public List saveFiles(@Nonnull MinInfoBoard680Dto dto) { List entityList = new ArrayList<>(); MultipartFile[] files = dto.getFiles(); + String makePath = ""; if(files != null && files.length > 0){ - String makePath = File.separator + DateUtil.getToday(""); + //makePath = File.separator + DateUtil.getToday(""); // 파일 경로 : upload root 제외 String urlPath = this.uploadPath + makePath;