Skip to content

Commit

Permalink
fix: s3 저장 url에 만료시간 붙지 않도록 수정 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bellroute authored Jun 2, 2024
1 parent 0f1f222 commit efe2673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Empty file.
6 changes: 4 additions & 2 deletions src/main/java/com/climingo/climingoApi/upload/S3Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public String uploadVideoFile(MultipartFile videoFile) throws IOException {

URL videoUrl = generatePermanentPresignedUrl(fileName.toString());

return videoUrl.toString();
return videoUrl.toString().substring(0, videoUrl.toString().indexOf("?"));
}

private File convertMultipartFileToFile(MultipartFile file) throws IOException {
Expand Down Expand Up @@ -73,6 +73,8 @@ public String uploadImageFile(File image) {
CannedAccessControlList.PublicRead));
image.delete();

return generatePermanentPresignedUrl(fileName.toString()).toString();
URL url = generatePermanentPresignedUrl(fileName.toString());

return url.toString().substring(0, url.toString().indexOf("?"));
}
}

0 comments on commit efe2673

Please sign in to comment.