From 2dc81cc128b84e24a0401b5ddf0cf4d3fbf9945c Mon Sep 17 00:00:00 2001 From: KWY Date: Tue, 30 Jan 2024 15:43:41 +0900 Subject: [PATCH] =?UTF-8?q?#198=20[feat]=20=EA=B0=9C=EB=B0=9C/=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=9A=A9=20=EB=B2=84=ED=82=B7=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=20=EA=B8=B8=EC=9D=B4=20=EA=B3=A0=EB=A0=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/moddy/server/external/s3/S3Service.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/moddy/server/external/s3/S3Service.java b/src/main/java/com/moddy/server/external/s3/S3Service.java index be21177d..29128d0f 100644 --- a/src/main/java/com/moddy/server/external/s3/S3Service.java +++ b/src/main/java/com/moddy/server/external/s3/S3Service.java @@ -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}") @@ -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() {