Skip to content

Commit

Permalink
fix: webp 확장자 지원 삭제
Browse files Browse the repository at this point in the history
- iOS에서 webp 지원 불가 이슈
  • Loading branch information
seokjin8678 committed May 11, 2024
1 parent 4089b10 commit 2feb53a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
public class ImageFileUploadService {

private static final int MAX_FILE_SIZE = 2_000_000; // 2MB
private static final Set<FileExtension> ALLOW_IMAGE_EXTENSION = EnumSet.of(FileExtension.JPG, FileExtension.JPEG,
FileExtension.PNG, FileExtension.WEBP);
private static final Set<FileExtension> ALLOW_IMAGE_EXTENSION = EnumSet.of(FileExtension.JPG, FileExtension.JPEG, FileExtension.PNG);

private final StorageClient storageClient;
private final UploadFileRepository uploadFileRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public enum FileExtension {
JPG(".jpg", MimeTypeUtils.IMAGE_JPEG),
JPEG(".jpeg", MimeTypeUtils.IMAGE_JPEG),
PNG(".png", MimeTypeUtils.IMAGE_PNG),
WEBP(".webp", new MimeType("image", "webp")),
NONE("", MimeTypeUtils.APPLICATION_OCTET_STREAM),
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void setUp() {
}

@ParameterizedTest
@ValueSource(strings = {"image.png", "image.jpg", "image.jpeg", "image.webp"})
@ValueSource(strings = {"image.png", "image.jpg", "image.jpeg"})
void 이미지를_업로드할때_JPG_PNG_확장자이면_성공한다(String filename) {
// given
MultipartFile multipartFile = new MockMultipartFile("image", filename, "image/png",
Expand Down

0 comments on commit 2feb53a

Please sign in to comment.