Merge branch 'dev' into 'deploy-dev-admin'
Dev See merge request korea-research/korea-research!55
This commit is contained in:
@@ -12,7 +12,7 @@ public enum FileUploadType {
|
|||||||
// URI og:image 용 이미지 파일
|
// URI og:image 용 이미지 파일
|
||||||
OG_IMAGE(Set.of(FileStorageType.LOCAL), "/ogImage", Set.of(AcceptableFileType.IMAGE)),
|
OG_IMAGE(Set.of(FileStorageType.LOCAL), "/ogImage", Set.of(AcceptableFileType.IMAGE)),
|
||||||
// WEB Editor 이미지 파일
|
// WEB Editor 이미지 파일
|
||||||
EDITOR_IMAGE(Set.of(FileStorageType.LOCAL), "/editorImage", Set.of(AcceptableFileType.IMAGE)),
|
EDITOR_IMAGE(Set.of(FileStorageType.SFTP,FileStorageType.LOCAL), "/editorImage", Set.of(AcceptableFileType.IMAGE)),
|
||||||
|
|
||||||
PUBLIC(
|
PUBLIC(
|
||||||
Set.of(FileStorageType.LOCAL),
|
Set.of(FileStorageType.LOCAL),
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package app.module.front.usecase.editor.adapters.web;
|
package app.module.front.usecase.editor.adapters.web;
|
||||||
|
|
||||||
|
import app.module.core.config.application.enums.FileStorageType;
|
||||||
import app.module.core.config.application.enums.FileUploadType;
|
import app.module.core.config.application.enums.FileUploadType;
|
||||||
import app.module.core.usecase.file.saveToStorage.ports.SaveToStoragePortIn;
|
import app.module.core.usecase.file.saveToStorage.ports.SaveToStoragePortIn;
|
||||||
import app.module.core.usecase.file.saveToStorage.ports.application.domain.SaveToStorage;
|
import app.module.core.usecase.file.saveToStorage.ports.application.domain.SaveToStorage;
|
||||||
import app.module.core.usecase.file.url.application.port.in.FileUrlPortIn;
|
import app.module.core.usecase.file.url.application.port.in.FileUrlPortIn;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -19,6 +21,9 @@ public class EditorImageUploadController {
|
|||||||
private final SaveToStoragePortIn saveToStoragePortIn;
|
private final SaveToStoragePortIn saveToStoragePortIn;
|
||||||
private final FileUrlPortIn fileUrlPortIn;
|
private final FileUrlPortIn fileUrlPortIn;
|
||||||
|
|
||||||
|
@Value("${path.upload.storage}")
|
||||||
|
private String uploadStorageType;
|
||||||
|
|
||||||
@PostMapping(path = "/api/front/editorImage/upload")
|
@PostMapping(path = "/api/front/editorImage/upload")
|
||||||
ResponseEntity<?> editorImageUpload(MultipartFile editorImage) throws IOException {
|
ResponseEntity<?> editorImageUpload(MultipartFile editorImage) throws IOException {
|
||||||
SaveToStorage saveToStorage =
|
SaveToStorage saveToStorage =
|
||||||
@@ -27,7 +32,7 @@ public class EditorImageUploadController {
|
|||||||
return ResponseEntity.status(HttpStatus.OK)
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
.body(
|
.body(
|
||||||
fileUrlPortIn.getInline(
|
fileUrlPortIn.getInline(
|
||||||
saveToStorage.getType().getFileStorageType(),
|
FileStorageType.valueOf(uploadStorageType),
|
||||||
saveToStorage.getPath(),
|
saveToStorage.getPath(),
|
||||||
saveToStorage.getName()));
|
saveToStorage.getName()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package app.module.front.usecase.info.notice.getNotice.adapters.persistence;
|
package app.module.front.usecase.info.notice.getNotice.adapters.persistence;
|
||||||
|
|
||||||
|
import app.module.core.config.application.enums.FileStorageType;
|
||||||
import app.module.core.usecase.file.url.application.port.in.FileUrlPortIn;
|
import app.module.core.usecase.file.url.application.port.in.FileUrlPortIn;
|
||||||
import app.module.front.usecase.info.notice.getNotice.ports.GetNoticePortOut;
|
import app.module.front.usecase.info.notice.getNotice.ports.GetNoticePortOut;
|
||||||
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNotice;
|
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNotice;
|
||||||
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNoticeCmd;
|
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNoticeCmd;
|
||||||
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNoticeUploadFile;
|
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNoticeUploadFile;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -20,6 +22,9 @@ class GetNoticeDao implements GetNoticePortOut {
|
|||||||
private final GetNoticeMapper mapper;
|
private final GetNoticeMapper mapper;
|
||||||
private final FileUrlPortIn fileUrlPortIn;
|
private final FileUrlPortIn fileUrlPortIn;
|
||||||
|
|
||||||
|
@Value("${path.upload.storage}")
|
||||||
|
private String uploadStorageType;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Optional<GetNotice> operate(GetNoticeCmd command) {
|
public Optional<GetNotice> operate(GetNoticeCmd command) {
|
||||||
@@ -35,13 +40,13 @@ class GetNoticeDao implements GetNoticePortOut {
|
|||||||
// 참조 URL 전달
|
// 참조 URL 전달
|
||||||
uploadFile.setReferURL(
|
uploadFile.setReferURL(
|
||||||
fileUrlPortIn.getInline(
|
fileUrlPortIn.getInline(
|
||||||
uploadFile.getType().getFileStorageType(),
|
FileStorageType.valueOf(uploadStorageType),
|
||||||
uploadFile.getPath(),
|
uploadFile.getPath(),
|
||||||
uploadFile.getName()));
|
uploadFile.getName()));
|
||||||
// attachment URL 전달
|
// attachment URL 전달
|
||||||
uploadFile.setAttachmentURL(
|
uploadFile.setAttachmentURL(
|
||||||
fileUrlPortIn.getAttachment(
|
fileUrlPortIn.getAttachment(
|
||||||
uploadFile.getType().getFileStorageType(), uploadFile.getId()));
|
FileStorageType.valueOf(uploadStorageType), uploadFile.getId()));
|
||||||
|
|
||||||
return uploadFile;
|
return uploadFile;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -26,8 +26,17 @@
|
|||||||
<meta name="_csrf" th:content="${_csrf.token}"/>
|
<meta name="_csrf" th:content="${_csrf.token}"/>
|
||||||
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" /><!-- TODO : href="pathImages/" -->
|
<meta name="theme-color" content="#4BBC43">
|
||||||
<link rel="shortcut icon" type="image/x-icon" /><!-- TODO : href="pathImages/" -->
|
<!-- 메인 아이콘 (512x512 PNG) -->
|
||||||
|
<!-- <link rel="icon" href="/icon-512.png" sizes="512x512"> -->
|
||||||
|
<link rel="icon" sizes="512x512"><!-- TODO : href="" -->
|
||||||
|
<!-- iOS 홈화면 -->
|
||||||
|
<!-- <link rel="apple-touch-icon" href="/icon-512.png"> -->
|
||||||
|
<link rel="apple-touch-icon"><!-- TODO : href="" -->
|
||||||
|
<!-- PWA -->
|
||||||
|
<link rel="manifest" href="/manifest.json">
|
||||||
|
<link rel="icon" type="image/x-icon" /><!-- TODO : href="" -->
|
||||||
|
|
||||||
<link th:href="@{/static/assets/styles/style.css}" type="text/css" rel="stylesheet" />
|
<link th:href="@{/static/assets/styles/style.css}" type="text/css" rel="stylesheet" />
|
||||||
<script th:src="@{/static/assets/scripts/common.ui.plugin.js}"></script>
|
<script th:src="@{/static/assets/scripts/common.ui.plugin.js}"></script>
|
||||||
<script th:src="@{/static/assets/scripts/common.ui.js}" data-init></script>
|
<script th:src="@{/static/assets/scripts/common.ui.js}" data-init></script>
|
||||||
@@ -130,10 +139,10 @@
|
|||||||
<dd class="address">
|
<dd class="address">
|
||||||
<p>주소</p>
|
<p>주소</p>
|
||||||
<span>
|
<span>
|
||||||
Office1. (06652)서울시 서초구 사임당로 18, 석오빌딩 8F
|
Office 1. (06652) 서울시 서초구 사임당로 18, 석오빌딩 8F
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
Office2. (06651)서울시 서초구 사임당로 32, 재우빌딩 9F
|
Office 2. (06651) 서울시 서초구 사임당로 32, 재우빌딩 9F
|
||||||
</span>
|
</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd>
|
<dd>
|
||||||
|
|||||||
Reference in New Issue
Block a user