From 393fe3a7da3769c44b91440f1a7c28156f032915 Mon Sep 17 00:00:00 2001 From: Junbye Date: Tue, 14 Jan 2025 12:23:56 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=EC=8B=9C=20=EA=B0=9D=EC=B2=B4=EC=9D=98=20Key?= =?UTF-8?q?=EC=95=9E=EC=97=90=20=EA=B3=B5=EB=B0=B1=EB=AC=B8=EC=9E=90=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95,=20=EB=94=94=EB=B2=84=EA=B9=85=20=ED=94=84=EB=A6=B0?= =?UTF-8?q?=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/example/toyTeam6Airbnb/Image/ImageController.kt | 2 +- .../kotlin/com/example/toyTeam6Airbnb/Image/ImageService.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageController.kt b/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageController.kt index 0205123..0e912ec 100644 --- a/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageController.kt +++ b/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageController.kt @@ -39,7 +39,7 @@ class ImageController( ): ResponseEntity { return try { val file = request.file - val key = request.key + val key = request.key.trim() val tempFile = Paths.get(System.getProperty("java.io.tmpdir"), file.originalFilename).toFile() file.transferTo(tempFile) // MultipartFile을 임시 파일로 저장 diff --git a/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageService.kt b/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageService.kt index 6a32a02..b26daae 100644 --- a/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageService.kt +++ b/src/main/kotlin/com/example/toyTeam6Airbnb/Image/ImageService.kt @@ -29,6 +29,7 @@ class ImageService() { // 파일 업로드 메서드 fun uploadFile(filePath: String, key: String) { + println("Uploading File with key : $key") // 디버깅 s3Client.putObject( PutObjectRequest.builder() .bucket(bucketName)