From e6fd535abfa449bad5453c38ae3859bbed8b919d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9A=B0=EA=B0=80?= Date: Tue, 12 Sep 2023 21:14:46 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20hotfix:=20s3=20=EA=B6=8C=ED=95=9C?= =?UTF-8?q?=EC=9D=84=20=EC=96=BB=EC=9D=84=20=EB=95=8C=20=EC=9D=BD=EA=B8=B0?= =?UTF-8?q?=20=EA=B6=8C=ED=95=9C=20=EC=B6=94=EA=B0=80=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=20(#602)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: s3 path 를 file full path 로 수정 * fix: 파일 확장자 앞에 . 추가 * fix: 권한 추가 삭제 --- backend/src/main/java/com/funeat/common/s3/S3Uploader.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/main/java/com/funeat/common/s3/S3Uploader.java b/backend/src/main/java/com/funeat/common/s3/S3Uploader.java index dd0bc062e..23a572ad0 100644 --- a/backend/src/main/java/com/funeat/common/s3/S3Uploader.java +++ b/backend/src/main/java/com/funeat/common/s3/S3Uploader.java @@ -4,7 +4,6 @@ import static com.funeat.exception.CommonErrorCode.UNKNOWN_SERVER_ERROR_CODE; import com.amazonaws.services.s3.AmazonS3; -import com.amazonaws.services.s3.model.CannedAccessControlList; import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.PutObjectRequest; import com.funeat.common.ImageUploader; @@ -78,7 +77,6 @@ private ObjectMetadata getMetadata(final MultipartFile image) { private PutObjectRequest getPutObjectRequest(final MultipartFile image, final String key, final ObjectMetadata metadata) throws IOException { - return new PutObjectRequest(bucket, key, image.getInputStream(), metadata) - .withCannedAcl(CannedAccessControlList.PublicRead); + return new PutObjectRequest(bucket, key, image.getInputStream(), metadata); } }