Skip to content

Commit

Permalink
BE: [fix] S3 메타데이터만 요청하도록 수정 CSID-DGU#89
Browse files Browse the repository at this point in the history
  • Loading branch information
jjin70 committed Nov 25, 2024
1 parent 7d2b73b commit bfe07dc
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public List<String> 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);
Expand Down

0 comments on commit bfe07dc

Please sign in to comment.