diff --git a/src/backend/src/main/java/RunningMachines/R2R/global/s3/S3Provider.java b/src/backend/src/main/java/RunningMachines/R2R/global/s3/S3Provider.java index acec73d..e022300 100644 --- a/src/backend/src/main/java/RunningMachines/R2R/global/s3/S3Provider.java +++ b/src/backend/src/main/java/RunningMachines/R2R/global/s3/S3Provider.java @@ -79,8 +79,7 @@ public List getCourseFiles() { // 원본 파일명 가져오기 public String getOriginalFileName(String transformedFileName) { try { - S3Object s3Object = amazonS3Client.getObject(bucket, transformedFileName); - ObjectMetadata metadata = s3Object.getObjectMetadata(); + ObjectMetadata metadata = amazonS3Client.getObjectMetadata(bucket, transformedFileName); return metadata.getUserMetadata().getOrDefault("original-fileName", transformedFileName); } catch (Exception e) { log.error("Error retrieving original filename: {}", e.getMessage(), e);