Skip to content

✨ refactor(#26): FileStore -> FileService 로 리팩터링#27

Merged
5nam merged 3 commits intodevelopfrom
refactor/26-file-service
Apr 7, 2025
Merged

✨ refactor(#26): FileStore -> FileService 로 리팩터링#27
5nam merged 3 commits intodevelopfrom
refactor/26-file-service

Conversation

@5nam
Copy link
Collaborator

@5nam 5nam commented Apr 4, 2025

✨ refactor(#26): FileStore -> FileService 로 리팩터링

  • FileService 구현 완료(S3 연동해서 테스트만 해보면 됨)

📌 변경 사항 (What’s changed?)

  • FileStore 를 FileService 인터페이스로 변경
  • LocalFileService 와 AwsS3FileService 두가지 구현체 구현

⚙️ 변경 이유 (Why?)

  • 테스트 시 사용할 LocalFileService 와 실제 운영 시 사용할 AwsS3FileService 로 나눠서 구현

✅ 테스트 방법 (How to test?)

  • 일단, 외부 S3 와 연동된 상태가 아니므로 LocalFileService 테스트 코드 추가

🤔 기타 참고 사항

  • 사용 방법
fileService.upload(clubUpdateInput.getProfileImg(), "/club_profile")

매개변수 1️⃣ : MultipartFile 객체(실제 전달되는 파일)
매개변수 2️⃣ : 저장할 경로, 만약 club 의 대표 이미지이면 위의 예시처럼 "/club_profile" 로 지정해서 넘겨주면 됨(추후에 상수화해서 사용하는 것도 괜찮을 듯)

💬리뷰 요구사항

  • 파일 서비스 구현했고, 테스트 코드도 작성했으니 보시고 편하게 피드백 주세요 ~!

@5nam 5nam added ✨ feature New feature or request ♻️ refactor Refactor code labels Apr 4, 2025
@5nam 5nam self-assigned this Apr 4, 2025
@5nam 5nam requested review from hojooo and y3binchoi as code owners April 4, 2025 13:42
@5nam 5nam linked an issue Apr 4, 2025 that may be closed by this pull request
@hojooo
Copy link
Collaborator

hojooo commented Apr 5, 2025

수고하셨습니다!

Copy link
Collaborator

@y3binchoi y3binchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 사용 방법까지 정리해주셔서 넘 좋아요 👍

@5nam 5nam merged commit 9b0e6ab into develop Apr 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ refactor Refactor code ✨ feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File 서비스 리팩터링

3 participants