Skip to content

Commit

Permalink
이미지 업로드시 객체의 Key앞에 공백문자 제거하도록 수정, 디버깅 프린트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JunBye committed Jan 14, 2025
1 parent 66dcf1e commit 393fe3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ImageController(
): ResponseEntity<String> {
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을 임시 파일로 저장
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ImageService() {

// 파일 업로드 메서드
fun uploadFile(filePath: String, key: String) {
println("Uploading File with key : $key") // 디버깅
s3Client.putObject(
PutObjectRequest.builder()
.bucket(bucketName)
Expand Down

0 comments on commit 393fe3a

Please sign in to comment.