Skip to content

Commit

Permalink
#3 [add] 사진 지우는 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
2zerozu committed Jun 1, 2023
1 parent f7b7296 commit 17a69dc
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public List<String> uploadImages(List<MultipartFile> multipartFileList, String f
return imageList;
}

public void deleteFile(String imageUrl) {
String imageKey = imageUrl.substring(56);
amazonS3.deleteObject(bucket, imageKey);
}

// 파일명 (중복 방지)
private String createFileName(String fileName) {
return UUID.randomUUID().toString().concat(getFileExtension(fileName));
Expand Down

0 comments on commit 17a69dc

Please sign in to comment.