Skip to content

Commit

Permalink
delete :: 이미지 확장자 검사 로직 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Umjiseung committed Mar 26, 2024
1 parent 7ec17d7 commit 2e2610d
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,6 @@ class UploadImageService(
private val s3Util: S3Util
) {
fun execute(image: MultipartFile): UploadImageResDto {
val list = listOf("jpg", "jpeg", "png", "gif")

val splitFile = image.originalFilename.toString().split(".")

if(splitFile.size < 2)
throw FileExtensionInvalidException()

val extension = splitFile[1].lowercase()

if(list.none { it == extension })
throw FileExtensionInvalidException()

val imgURL = s3Util.imageUpload(image)

return UploadImageResDto(imgURL)
Expand Down

0 comments on commit 2e2610d

Please sign in to comment.