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 용 이미지 파일
|
||||
OG_IMAGE(Set.of(FileStorageType.LOCAL), "/ogImage", Set.of(AcceptableFileType.IMAGE)),
|
||||
// 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(
|
||||
Set.of(FileStorageType.LOCAL),
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
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.usecase.file.saveToStorage.ports.SaveToStoragePortIn;
|
||||
import app.module.core.usecase.file.saveToStorage.ports.application.domain.SaveToStorage;
|
||||
import app.module.core.usecase.file.url.application.port.in.FileUrlPortIn;
|
||||
import java.io.IOException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -19,6 +21,9 @@ public class EditorImageUploadController {
|
||||
private final SaveToStoragePortIn saveToStoragePortIn;
|
||||
private final FileUrlPortIn fileUrlPortIn;
|
||||
|
||||
@Value("${path.upload.storage}")
|
||||
private String uploadStorageType;
|
||||
|
||||
@PostMapping(path = "/api/front/editorImage/upload")
|
||||
ResponseEntity<?> editorImageUpload(MultipartFile editorImage) throws IOException {
|
||||
SaveToStorage saveToStorage =
|
||||
@@ -27,7 +32,7 @@ public class EditorImageUploadController {
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(
|
||||
fileUrlPortIn.getInline(
|
||||
saveToStorage.getType().getFileStorageType(),
|
||||
FileStorageType.valueOf(uploadStorageType),
|
||||
saveToStorage.getPath(),
|
||||
saveToStorage.getName()));
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
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.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.GetNoticeCmd;
|
||||
import app.module.front.usecase.info.notice.getNotice.ports.application.domain.GetNoticeUploadFile;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -20,6 +22,9 @@ class GetNoticeDao implements GetNoticePortOut {
|
||||
private final GetNoticeMapper mapper;
|
||||
private final FileUrlPortIn fileUrlPortIn;
|
||||
|
||||
@Value("${path.upload.storage}")
|
||||
private String uploadStorageType;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Optional<GetNotice> operate(GetNoticeCmd command) {
|
||||
@@ -35,13 +40,13 @@ class GetNoticeDao implements GetNoticePortOut {
|
||||
// 참조 URL 전달
|
||||
uploadFile.setReferURL(
|
||||
fileUrlPortIn.getInline(
|
||||
uploadFile.getType().getFileStorageType(),
|
||||
FileStorageType.valueOf(uploadStorageType),
|
||||
uploadFile.getPath(),
|
||||
uploadFile.getName()));
|
||||
// attachment URL 전달
|
||||
uploadFile.setAttachmentURL(
|
||||
fileUrlPortIn.getAttachment(
|
||||
uploadFile.getType().getFileStorageType(), uploadFile.getId()));
|
||||
FileStorageType.valueOf(uploadStorageType), uploadFile.getId()));
|
||||
|
||||
return uploadFile;
|
||||
})
|
||||
|
||||
@@ -26,8 +26,17 @@
|
||||
<meta name="_csrf" th:content="${_csrf.token}"/>
|
||||
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
||||
|
||||
<link rel="icon" type="image/x-icon" /><!-- TODO : href="pathImages/" -->
|
||||
<link rel="shortcut icon" type="image/x-icon" /><!-- TODO : href="pathImages/" -->
|
||||
<meta name="theme-color" content="#4BBC43">
|
||||
<!-- 메인 아이콘 (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" />
|
||||
<script th:src="@{/static/assets/scripts/common.ui.plugin.js}"></script>
|
||||
<script th:src="@{/static/assets/scripts/common.ui.js}" data-init></script>
|
||||
@@ -130,10 +139,10 @@
|
||||
<dd class="address">
|
||||
<p>주소</p>
|
||||
<span>
|
||||
Office1. (06652)서울시 서초구 사임당로 18, 석오빌딩 8F
|
||||
Office 1. (06652) 서울시 서초구 사임당로 18, 석오빌딩 8F
|
||||
</span>
|
||||
<span>
|
||||
Office2. (06651)서울시 서초구 사임당로 32, 재우빌딩 9F
|
||||
Office 2. (06651) 서울시 서초구 사임당로 32, 재우빌딩 9F
|
||||
</span>
|
||||
</dd>
|
||||
<dd>
|
||||
|
||||
Reference in New Issue
Block a user