diff --git a/backend/src/main/java/com/festago/upload/application/ImageFileUploadService.java b/backend/src/main/java/com/festago/upload/application/ImageFileUploadService.java index e42f66687..9f6391b70 100644 --- a/backend/src/main/java/com/festago/upload/application/ImageFileUploadService.java +++ b/backend/src/main/java/com/festago/upload/application/ImageFileUploadService.java @@ -25,7 +25,7 @@ public class ImageFileUploadService { private static final int MAX_FILE_SIZE = 2_000_000; // 2MB - private static final Set ALLOW_IMAGE_EXTENSION = EnumSet.of(FileExtension.JPG, FileExtension.PNG); + private static final Set ALLOW_IMAGE_EXTENSION = EnumSet.of(FileExtension.JPG, FileExtension.JPEG, FileExtension.PNG); private final StorageClient storageClient; private final UploadFileRepository uploadFileRepository; diff --git a/backend/src/main/java/com/festago/upload/domain/FileExtension.java b/backend/src/main/java/com/festago/upload/domain/FileExtension.java index ef511f693..b5387464c 100644 --- a/backend/src/main/java/com/festago/upload/domain/FileExtension.java +++ b/backend/src/main/java/com/festago/upload/domain/FileExtension.java @@ -8,6 +8,7 @@ @RequiredArgsConstructor public enum FileExtension { JPG(".jpg", MimeTypeUtils.IMAGE_JPEG), + JPEG(".jpeg", MimeTypeUtils.IMAGE_JPEG), PNG(".png", MimeTypeUtils.IMAGE_PNG), NONE("", MimeTypeUtils.APPLICATION_OCTET_STREAM), ; diff --git a/backend/src/test/java/com/festago/upload/application/ImageFileUploadServiceTest.java b/backend/src/test/java/com/festago/upload/application/ImageFileUploadServiceTest.java index 108de8663..60a752fbd 100644 --- a/backend/src/test/java/com/festago/upload/application/ImageFileUploadServiceTest.java +++ b/backend/src/test/java/com/festago/upload/application/ImageFileUploadServiceTest.java @@ -41,7 +41,7 @@ void setUp() { } @ParameterizedTest - @ValueSource(strings = {"image.png", "image.jpg"}) + @ValueSource(strings = {"image.png", "image.jpg", "image.jpeg"}) void 이미지를_업로드할때_JPG_PNG_확장자이면_성공한다(String filename) { // given MultipartFile multipartFile = new MockMultipartFile("image", filename, "image/png",