Skip to content

Commit 07f054e

Browse files
committed
🔀 Dev브랜치 병합
2 parents 3b91e22 + 4ee3206 commit 07f054e

File tree

4 files changed

+38
-14
lines changed

4 files changed

+38
-14
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,22 @@
33
사용자는 웹 페이지에서 졸업 축하 메시지와 사진을 업로드할 수 있으며, 졸업 당사자는 졸업식 당일에 축하 게시물들을 모아 깔끔하게 편집된 PDF 파일로 다운로드할 수 있습니다. 이를 통해 졸업의 소중한 추억을 디지털로 보관하고, 간편하게 공유할 수 있습니다.
44
<br><br>
55

6+
### PM / Design
7+
|<img src="https://avatars.githubusercontent.com/u/114335932?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/114573447?v=4" width="150" height="150"/>|
8+
|:-:|:-:|
9+
|[@lanapi](https://github.com/lanapi) 송효재 |박성민 |
10+
<br>
11+
12+
### Forntend
13+
|<img src="https://avatars.githubusercontent.com/u/146899497?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/147235267?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/139226103?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/114573447?v=4" width="150" height="150"/>|
14+
|:-:|:-:|:-:|:-:|
15+
|[@joyeeon](https://github.com/joyeeon) 조희연 |[@PocheonLim](https://github.com/PocheonLim) 임성훈 |[@shail1027](https://github.com/shail1027) 이예빈 |[@Simmee02](https://github.com/Simmee02) 심지영|
16+
<br>
17+
618
### Backend
719
|<img src="https://avatars.githubusercontent.com/u/113746577?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/162952415?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/143693285?v=4" width="150" height="150"/>|<img src="https://avatars.githubusercontent.com/u/138271153?v=4" width="150" height="150"/>|
820
|:-:|:-:|:-:|:-:|
921
|[@kimjy0117](https://github.com/kimjy0117) 김주영 |[@naooung](https://github.com/naooung) 김나경 |[@cinsy26](https://github.com/cinsy26) 세연 |[@sinyoung6491](https://github.com/sinyoung6491) 신영 |
10-
1122
<br>
1223

1324
## Stacks

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services:
3030
ports:
3131
- 8080:8080
3232
environment:
33-
SPRING_PROFILES_ACTIVE: prod # Spring 프로파일을 prod로 설정
33+
SPRING_PROFILES_ACTIVE: prod # Spring 프로파일을 prod로 설정
3434
depends_on:
3535
mysql:
3636
condition: service_healthy

src/main/java/com/example/graduate/domain/letter/service/LetterService.java

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,34 @@ public void createLetter(Long albumId, LetterCreateRequestDTO requestDTO, Multip
4949

5050
String picUrl = null;
5151

52-
// 파일이 있으면 UUID 생성 + S3 업로드 + URL 추출
52+
//파일이 있으면 UUID 생성 + S3 업로드 + URL 추출
5353
if (file != null && !file.isEmpty()) {
5454
//확장자 검사 로직 추가
5555
String originalFilename = file.getOriginalFilename();
5656
if (originalFilename != null) {
5757
String lowerCaseName = originalFilename.toLowerCase();
58-
if (!(lowerCaseName.endsWith(".jpg") || lowerCaseName.endsWith(".jpeg") ||
59-
lowerCaseName.endsWith(".png") )) {
60-
throw new GeneralException(LetterErrorStatus.INVALID_FILE_EXTENSION);
58+
59+
//default 이미지인 경우 s3 업로드 하지 않기
60+
if (lowerCaseName.equals("defaultimage1") ||
61+
lowerCaseName.equals("defaultimage2") ||
62+
lowerCaseName.equals("defaultimage3")) {
63+
picUrl = lowerCaseName; // DB에 그대로 저장
64+
} else {
65+
// 확장자 검사
66+
if (!(lowerCaseName.endsWith(".jpg") || lowerCaseName.endsWith(".jpeg") ||
67+
lowerCaseName.endsWith(".png"))) {
68+
throw new GeneralException(LetterErrorStatus.INVALID_FILE_EXTENSION);
69+
}
70+
// S3 업로드
71+
Uuid savedUuid = uuidRepository.save(
72+
Uuid.builder()
73+
.uuid(UUID.randomUUID().toString())
74+
.build()
75+
);
76+
String keyName = amazonS3Manager.generateLetterKeyName(file, savedUuid);
77+
picUrl = amazonS3Manager.uploadFile(keyName, file);
6178
}
6279
}
63-
Uuid savedUuid = uuidRepository.save(
64-
Uuid.builder()
65-
.uuid(UUID.randomUUID().toString())
66-
.build()
67-
);
68-
69-
String keyName = amazonS3Manager.generateLetterKeyName(file, savedUuid);
70-
picUrl = amazonS3Manager.uploadFile(keyName, file);
7180
}
7281

7382
//추가

src/main/java/com/example/graduate/global/config/SecurityConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception{
3737
.requestMatchers("/actuator/prometheus").permitAll()
3838
.requestMatchers("/api/test/permit-all").permitAll()
3939
.requestMatchers("/api/albums/**").permitAll()
40+
<<<<<<< HEAD
4041
.requestMatchers("/api/auth/kakao/**", "/api/auth/refresh").permitAll()
42+
=======
43+
.requestMatchers("/api/auth/kakao/**", "api/auth/refresh").permitAll()
44+
>>>>>>> develop
4145
.requestMatchers("/api/project/**").permitAll()
4246
.anyRequest().authenticated())
4347

0 commit comments

Comments
 (0)