From bfe07dcceb3ea7de3992384c5f2ed145cb2d8906 Mon Sep 17 00:00:00 2001 From: jjin70 Date: Mon, 25 Nov 2024 16:39:58 +0900 Subject: [PATCH] =?UTF-8?q?BE:=20[fix]=20S3=20=EB=A9=94=ED=83=80=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=EB=A7=8C=20=EC=9A=94=EC=B2=AD=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20#89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/RunningMachines/R2R/global/s3/S3Provider.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);