chore(API): 공정 컨트롤러 및 라우팅 업데이트
- ProcessController: 공정 관리 API 개선 - routes/api.php: API 라우팅 정리 - CURRENT_WORKS.md: 작업 현황 업데이트 - LOGICAL_RELATIONSHIPS.md: 논리적 관계 문서화 - profile-image-upload-api.md: 프로필 이미지 업로드 API 메모 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
42
.serena/memories/profile-image-upload-api.md
Normal file
42
.serena/memories/profile-image-upload-api.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 프로필 이미지 업로드 API 연동 (2025-12-29)
|
||||
|
||||
## 개요
|
||||
계정정보 페이지(`/settings/account-info`)에서 프로필 이미지 업로드 API 연동 완료
|
||||
|
||||
## 수정 파일
|
||||
|
||||
### API (api/)
|
||||
- `app/Services/TenantUserProfileService.php`
|
||||
- `updateMe()` 메서드 수정
|
||||
- 고정 필드(`profile_photo_path`, `display_name`)를 동적 필드 처리 전에 직접 저장
|
||||
- 기존 `effectiveFieldMap()` 로직은 동적 필드만 처리
|
||||
|
||||
### React (react/)
|
||||
- `src/components/settings/AccountInfoManagement/actions.ts`
|
||||
- `uploadProfileImage()` 함수 추가
|
||||
- FormData로 파일 업로드 후 profile_photo_path 업데이트
|
||||
|
||||
- `src/components/settings/AccountInfoManagement/types.ts`
|
||||
- `getProfileImageUrl()` 수정: `/storage/${path}` → `/storage/tenants/${path}`
|
||||
- DB에 저장된 경로(`287/temp/...`)와 실제 파일 위치(`tenants/287/temp/...`) 매핑
|
||||
|
||||
- `src/components/settings/AccountInfoManagement/index.tsx`
|
||||
- `handleImageUpload()` API 호출 연동
|
||||
- Optimistic UI 업데이트 구현
|
||||
|
||||
### 환경변수 정리
|
||||
- 65개 소스 파일에서 `NEXT_PUBLIC_API_URL` → `API_URL` 변경
|
||||
- `.env.local`, `.env.production`, `.env.example` 업데이트
|
||||
|
||||
### 심볼릭 링크
|
||||
- `storage/app/public/tenants -> ../tenants` 생성
|
||||
- 테넌트 파일 공개 접근 가능하도록 설정
|
||||
|
||||
## API 엔드포인트
|
||||
- 파일 업로드: `POST /api/v1/files/upload`
|
||||
- 프로필 업데이트: `PATCH /api/v1/profiles/me`
|
||||
|
||||
## 핵심 이슈 해결
|
||||
1. **이미지 지속성 문제**: `updateMe()`가 동적 필드만 처리하여 `profile_photo_path` 무시됨 → 고정 필드 별도 처리
|
||||
2. **URL 경로 불일치**: DB 저장 경로와 실제 파일 경로 차이 → `/storage/tenants/` 접두사 추가
|
||||
3. **심볼릭 링크 누락**: `public/storage`가 `tenants` 디렉토리 미포함 → 심볼릭 링크 추가
|
||||
Reference in New Issue
Block a user