From ec655cd963df68b3bb014070720eb5572578b9d1 Mon Sep 17 00:00:00 2001 From: leeeryboy Date: Wed, 30 Aug 2023 22:51:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20extension=20=EC=A4=91=EB=B3=B5,=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/resource/mainImage/service/MainImageService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/resource/mainImage/service/MainImageService.kt b/src/main/kotlin/com/wafflestudio/csereal/core/resource/mainImage/service/MainImageService.kt index c6d769e5..c6e4c138 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/resource/mainImage/service/MainImageService.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/resource/mainImage/service/MainImageService.kt @@ -58,11 +58,11 @@ class ImageServiceImpl( val filename = "${timeMillis}_${requestImage.originalFilename}" val totalFilename = path + filename - val saveFile = Paths.get("$totalFilename.$extension") + val saveFile = Paths.get(totalFilename) requestImage.transferTo(saveFile) val totalThumbnailFilename = "${path}thumbnail_$filename" - val thumbnailFile = Paths.get("$totalThumbnailFilename.$extension") + val thumbnailFile = Paths.get(totalThumbnailFilename) Thumbnailator.createThumbnail(saveFile.toFile(), thumbnailFile.toFile(), 100, 100); val image = MainImageEntity( @@ -91,7 +91,7 @@ class ImageServiceImpl( @Transactional override fun createImageURL(image: MainImageEntity?): String? { return if (image != null) { - "${endpointProperties.backend}/image/${image.filename}" + "${endpointProperties.backend}/file/${image.filename}" } else null }