Skip to content

Commit

Permalink
#198 [feat] 개발/배포 용 버킷 이름 길이 고려
Browse files Browse the repository at this point in the history
  • Loading branch information
KWY0218 committed Jan 30, 2024
1 parent e085e52 commit 2dc81cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/moddy/server/external/s3/S3Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class S3Service {
private final static String APPLICATION_PATH = "APPLICATION";
private final static String MODEL_PROFILE_PATH = "HAIR_MODEL_PROFILE";
private final static String MODEL_PROFILE_IMAGE_NAME = "/model_default_profile.png";
private final static int IMAGE_URL_PREFIX_LENGTH = 54;
private final static int IMAGE_URL_PREFIX_LENGTH = 41;
private final static int EXPIRED_TIME = 3;
private final AmazonS3 amazonS3;
@Value("${cloud.aws.s3.bucket}")
Expand Down Expand Up @@ -76,7 +76,7 @@ private String uploadImage(MultipartFile multipartFile, String path) {
}

private String getImageUrlToKey(final String imageUrl) {
return imageUrl.substring(IMAGE_URL_PREFIX_LENGTH);
return imageUrl.substring(IMAGE_URL_PREFIX_LENGTH + bucket.length());
}

private Date getExpiredTime() {
Expand Down

0 comments on commit 2dc81cc

Please sign in to comment.