Skip to content

Commit

Permalink
Merge pull request #262 from tipi-tapi/feature/261
Browse files Browse the repository at this point in the history
karlo 이미지 파일 확장자 변경
  • Loading branch information
akalswl14 authored Oct 16, 2023
2 parents b392f60 + 5bcac30 commit 8a372e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Image createImage(Diary diary, String imagePath, boolean isSelected) {
}

public Image uploadAndCreateImage(Diary diary, byte[] dallEImage, boolean isSelected) {
String imagePath = String.format(profile + "/post/%d/%s_%d.png", diary.getDiaryId(),
String imagePath = String.format(profile + "/post/%d/%s_%d.webp", diary.getDiaryId(),
new Date().getTime(), 1);
r2Service.uploadImage(dallEImage, imagePath);
return createImage(diary, imagePath, isSelected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public class CreateKarloImageRequest {
private String returnType;

public static CreateKarloImageRequest withUrl(String prompt) {
return new CreateKarloImageRequest(prompt, null, "png", 1, "url");
return new CreateKarloImageRequest(prompt, null, "webp", 1, "url");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private PutObjectRequest buildPutObjectRequest(String filePath) {
return PutObjectRequest.builder()
.bucket(bucketName)
.key(filePath)
.contentType("image/png")
.contentType("image/webp")
.acl(PRIVATE).build();
}
}

0 comments on commit 8a372e0

Please sign in to comment.