Skip to content

Commit

Permalink
[BE] hotfix: s3 권한을 얻을 때 읽기 권한 추가 삭제 (#602)
Browse files Browse the repository at this point in the history
* fix: s3 path 를 file full path 로 수정

* fix: 파일 확장자 앞에 . 추가

* fix: 권한 추가 삭제
  • Loading branch information
wugawuga authored Sep 12, 2023
1 parent c8f9505 commit e6fd535
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/src/main/java/com/funeat/common/s3/S3Uploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}

0 comments on commit e6fd535

Please sign in to comment.