Skip to content

Commit

Permalink
Feat : #33 주석 삭제후 함수의 의도를 더 잘 나타내도록 함수명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyobim committed Jan 10, 2023
1 parent 1f348b0 commit 9cbd153
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public String uploadFile(MultipartFile multipartFile, String filePath) {
String fileNameBefore = "https://gadchigam.s3.ap-northeast-2.amazonaws.com/";

log.info(multipartFile.getOriginalFilename());
String fileName = filePath + "/" + createFileName(multipartFile.getOriginalFilename());
String fileName = filePath + "/" + createRandomizedFileName(multipartFile.getOriginalFilename());
ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.setContentLength(multipartFile.getSize());
objectMetadata.setContentType(multipartFile.getContentType());
Expand All @@ -52,7 +52,7 @@ public String uploadFile(MultipartFile multipartFile, String filePath) {
}


private String createFileName(String fileName) { // 먼저 파일 업로드 시, 파일명을 난수화하기 위해 random으로 돌립니다.
private String createRandomizedFileName(String fileName) {
return UUID.randomUUID().toString().concat(getFileExtension(fileName));
}

Expand Down

0 comments on commit 9cbd153

Please sign in to comment.