클라이언트 메시지 다국어 처리
공개 API 변경 없음.
This commit is contained in:
@@ -12,10 +12,10 @@ fun validateImage(file: MultipartFile, gifAllowed: Boolean) {
|
||||
val mimeType = Tika().detect(file.bytes)
|
||||
|
||||
if (!mimeType.startsWith("image/")) {
|
||||
throw SodaException("이미지 파일만 업로드할 수 있습니다.")
|
||||
throw SodaException(messageKey = "image.error.only_image_allowed")
|
||||
}
|
||||
|
||||
if (mimeType == "image/gif" && !gifAllowed) {
|
||||
throw SodaException("GIF 파일은 유료 게시물만 업로드 할 수 있습니다.")
|
||||
throw SodaException(messageKey = "image.error.gif_paid_only")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user