Skip to content

Commit

Permalink
bug fix : 파일 삭제 안되던 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
MyunghyunNero committed Nov 21, 2023
1 parent 27afba7 commit 4bd86ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/kusitms/gallae/global/S3Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public String upload(MultipartFile multipartFile) throws IOException {
}

public void deleteFile(String fileName) {
s3Client.deleteObject(new DeleteObjectRequest(bucket, fileName));
String delFileName = fileName.replace(CLOUD_FRONT_DOMAIN_NAME+"/","");
s3Client.deleteObject(new DeleteObjectRequest(bucket, delFileName));
}
}

0 comments on commit 4bd86ab

Please sign in to comment.