Skip to content

Commit

Permalink
hotfix: s3 업로드 불가 해결 (#372)
Browse files Browse the repository at this point in the history
* chore: flyway 파일 명 변경

* fix: 이미지 파일 반환 경로 수정
  • Loading branch information
Kim0914 authored Sep 18, 2023
1 parent 76cd229 commit 852f7fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ private String uploadPhoto(MultipartFile multipartFile, String workingDirectory)
s3Client.putObject(new PutObjectRequest(bucket + folder + directory + workingDirectory, fileName, file));

file.delete();
return rootPath + SLASH + directory + SLASH + workingDirectory + SLASH + fileName;
return rootPath + SLASH + directory + workingDirectory + SLASH + fileName;
} catch (Exception e) {
e.printStackTrace();
throw new IllegalStateException("파일 업로드를 실패했습니다.");
}
}
Expand Down
2 changes: 1 addition & 1 deletion backend/pium/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring.flyway.enabled=false
aws.s3.root=https://test.image.storage
aws.s3.bucket=test/
aws.s3.folder=test/
aws.s3.directory=test
aws.s3.directory=test/
petPlant.image.directory=test
admin.account=account
admin.password=password
Expand Down

0 comments on commit 852f7fd

Please sign in to comment.