|
|
@ -178,7 +178,7 @@ public class Mngt03Controller extends ApplicationController {
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, String> uploadForSgg(MultipartFile mf, String sggCd, String fileSe){
|
|
|
|
private Map<String, String> uploadForSgg(MultipartFile mf, String sggCd, String fileSe){
|
|
|
|
Map<String,String> newFileInfoMap = new HashMap<>();
|
|
|
|
Map<String,String> newFileInfoMap = new HashMap<>();
|
|
|
|
String workDirPath = "files/"+fileSe;
|
|
|
|
String workDirPath = "files/etc/"+fileSe;
|
|
|
|
|
|
|
|
|
|
|
|
String ext = FilenameUtils.getExtension(mf.getOriginalFilename());
|
|
|
|
String ext = FilenameUtils.getExtension(mf.getOriginalFilename());
|
|
|
|
String fileName = sggCd+"."+ext;
|
|
|
|
String fileName = sggCd+"."+ext;
|
|
|
@ -192,13 +192,13 @@ public class Mngt03Controller extends ApplicationController {
|
|
|
|
File newFile = new File(newFileFullPath);
|
|
|
|
File newFile = new File(newFileFullPath);
|
|
|
|
if(newFile.exists()) {
|
|
|
|
if(newFile.exists()) {
|
|
|
|
if(!newFile.delete()) {
|
|
|
|
if(!newFile.delete()) {
|
|
|
|
throw new RuntimeException("[F]배경 이미지 업로드 중 오류가 발생하였습니다.");
|
|
|
|
throw new RuntimeException("[F]이미지 업로드 중 오류가 발생하였습니다.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mf.transferTo(newFile);
|
|
|
|
mf.transferTo(newFile);
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
throw new RuntimeException("[F]배경 이미지 업로드 중 오류가 발생하였습니다.");
|
|
|
|
throw new RuntimeException("[F]이미지 업로드 중 오류가 발생하였습니다.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
newFileInfoMap.put("filePath", newFileFullPath);
|
|
|
|
newFileInfoMap.put("filePath", newFileFullPath);
|
|
|
|