Conversation
weonest
reviewed
Dec 1, 2023
Comment on lines
+23
to
+30
| @GetMapping("/{purpose}") | ||
| public ResponseEntity<PutObjectUrlResponse> getImageUploadUrl(@PathVariable String purpose, | ||
| @RequestParam String fileName, | ||
| @Auth UserInfo userInfo) { | ||
| String keyPattern = ImageUploadPurpose.from(purpose).getKeyPattern(); | ||
| PutObjectUrlResponse response = storageService.generatePutObjectUrl(fileName, keyPattern); | ||
| return ResponseEntity.ok(response); | ||
| } |
| @GetMapping("/{purpose}") | ||
| public ResponseEntity<PutObjectUrlResponse> getImageUploadUrl(@PathVariable String purpose, | ||
| @RequestParam String fileName, | ||
| @Auth UserInfo userInfo) { |
Contributor
There was a problem hiding this comment.
userInfo가 사용되지 않는 거라면 지워도 좋을 것 같아요.
아니면 기존의 JwtAuthenticationInterceptor의 동작을 좀 추가해서 파라미터 어노테이션 정보만 확인하는 것이 아니라 메서드 어노태이션 정보도 확인하게끔 하면 UserInfo를 사용하지 않을 수 있을 것 같네요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ PR 체크리스트
💡 어떤 작업을 하셨나요?
Issue Number : close #175
작업 내용
스테디 모집글에 들어갈 사진을 업로드하기 위한 presigned url을 제공하는 기능이 필요해졌습니다.
기존에는 프로필 사진 업로드용 Presigned URL 제공 기능을
user도메인 패키지에 두었는데 새로운 기능이 필요해지면서 presigned url 제공 기능을 각 도메인 패키지에 두지 않고storage패키지에 통합하여 하나의 controller와 service 클래스를 이용하도록 변경했습니다.또한 스토리지에 용도별로 폴더를 분리하여 이미지를 저장하고자 했기 때문에 key pattern이 서로 달라야 하는데, 이를
ENUM으로 관리하도록 구현하였습니다.📝리뷰어에게
구조나 클래스명과 같은 부분에서 피드백 부탁 드립니다!🙇♀️