From 7d2b73bdd50ed60406d6031d9d0b7d8225b8626a Mon Sep 17 00:00:00 2001 From: jjin70 Date: Mon, 25 Nov 2024 16:15:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?BE:=20[feat]=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8(GPX=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20?= =?UTF-8?q?=ED=8C=8C=EC=8B=B1)=20=EC=83=9D=EC=84=B1=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20#32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../R2R/domain/course/service/CourseQueryService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/src/main/java/RunningMachines/R2R/domain/course/service/CourseQueryService.java b/src/backend/src/main/java/RunningMachines/R2R/domain/course/service/CourseQueryService.java index e7d2b9d..50c8527 100644 --- a/src/backend/src/main/java/RunningMachines/R2R/domain/course/service/CourseQueryService.java +++ b/src/backend/src/main/java/RunningMachines/R2R/domain/course/service/CourseQueryService.java @@ -86,7 +86,7 @@ public List getCourseDetails(double lat, double lon) { private List createTags(String fileName) { String name = fileName.substring(0, fileName.lastIndexOf('.')); // 확장자 제거 String[] tags = name.split("_"); // 파일명을 '_'로 구분하여 태그 리스트 생성 - tags = Arrays.copyOfRange(tags, 1, tags.length); // 첫 번째 태그를 제외한 배열 생성 (파일명 제일 앞에 있는 인덱스 제거) + tags = Arrays.copyOfRange(tags, 1, tags.length - 1); // 첫,마지막 번째 태그를 제외한 배열 생성 (파일명 인덱스 및 거리값 제거) return List.of(tags); } } From bfe07dcceb3ea7de3992384c5f2ed145cb2d8906 Mon Sep 17 00:00:00 2001 From: jjin70 Date: Mon, 25 Nov 2024 16:39:58 +0900 Subject: [PATCH 2/2] =?UTF-8?q?BE:=20[fix]=20S3=20=EB=A9=94=ED=83=80?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=A7=8C=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=ED=95=98=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);