Skip to content

Commit

Permalink
fix: UUID 생성 위치 수정 (#139)
Browse files Browse the repository at this point in the history
경매 이미지 업로드시 UUID를 각 이미지에 별도의 UUID 생성하도록 수정

Co-authored-by: Jun Choi <[email protected]>
  • Loading branch information
YeaChan05 and junest66 authored Dec 11, 2024
1 parent 74939d6 commit efcf600
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public CreatePresignedUrlResponse createPresignedUrl(BucketPrefix bucketPrefix,

public List<CreatePresignedUrlResponse> createAuctionPresignedUrls(final List<String> requests) {
Date expiration = getPreSignedUrlExpiration();
String fileId = UUID.randomUUID().toString();//하니의 경매가 동일한 fileId를 갖음
String name = BucketPrefix.AUCTION.getName();
return requests.stream()
.map(fileName -> {
String fileId = UUID.randomUUID().toString();
String objectKey = String.format("%s/%s/%s", name, fileId, fileName.hashCode());//실제로 파일명은 해시값으로 구분
GeneratePresignedUrlRequest request = getGeneratePreSignedUrlRequest(objectKey, expiration);
URL url = amazonS3.generatePresignedUrl(request);
Expand Down

0 comments on commit efcf600

Please sign in to comment.