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)