윈도우시스템에서도 웹에디터로 올린 이미지를 볼수있게 코드추가 및 MySql Closed방지
This commit is contained in:
@@ -150,7 +150,12 @@ public class AttachmentService extends AbstractService {
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public AttachmentImageResponseDto loadImage(String imagename) {
|
||||
return storageUtils.loadImage(imagename.replaceAll(EDITOR_FILE_SEPARATOR, FILE_SEPARATOR));
|
||||
if(FILE_SEPARATOR.equals("\\")) {//윈도우기반 자바시스템일 때 하이픈 character to be escaped is missing 에러방지
|
||||
imagename = imagename.replaceAll(EDITOR_FILE_SEPARATOR, "\\\\"); //getFileSystem().getPath에서 디스크의 경로를 사용할 때
|
||||
} else { //리눅스 또는 맥 기반 자바시스템 경로일 때(아래)
|
||||
imagename = imagename.replaceAll(EDITOR_FILE_SEPARATOR, FILE_SEPARATOR);
|
||||
}
|
||||
return storageUtils.loadImage(imagename);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user