Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ out/

### Env ###
.env
docs/
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.presigner.S3Presigner;
import software.amazon.awssdk.services.s3.S3Client;

@Configuration
Expand All @@ -22,19 +21,11 @@ public S3Config(S3Properties properties) {
}

/**
* presigned URL 을 만드는 서명기. 실제 S3 를 호출하지 않고 로컬에서 서명만 한다.
* S3 업로드용 클라이언트. 미션 인증 사진 업로드에 쓰인다.
*
* access-key/secret-key 가 주입되면 그 자격증명을 쓰고, 비어 있으면
* 기본 자격증명 체인(환경변수·EC2 IAM 역할 등)에 위임한다.
*/
@Bean
public S3Presigner s3Presigner() {
return S3Presigner.builder()
.region(resolveRegion())
.credentialsProvider(credentialsProvider())
.build();
}

@Bean
public S3Client s3Client() {
return S3Client.builder()
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public enum ErrorCode {
IMAGE_ERROR_400_EMPTY_FILE(HttpStatus.BAD_REQUEST, "이미지 파일이 비어 있습니다."),
IMAGE_ERROR_400_SIZE_EXCEEDED(HttpStatus.BAD_REQUEST, "이미지 파일은 10MB를 초과할 수 없습니다."),
IMAGE_ERROR_500_UPLOAD_FAILED(HttpStatus.INTERNAL_SERVER_ERROR, "이미지 업로드에 실패했습니다."),
IMAGE_ERROR_500_PRESIGNED_URL_FAILED(HttpStatus.INTERNAL_SERVER_ERROR, "이미지 업로드 URL 발급에 실패했습니다."),

// 미션
MISSION_ERROR_400_BEFORE_DETOX_START(HttpStatus.BAD_REQUEST, "디톡스 시작 시간 이전입니다."),
Expand Down

This file was deleted.

Loading