You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`FileStorageConfigTest` asserts the correct storage backend is wired for each mode.
98
+
-`UserControllerTest` verifies the new profile-photo endpoints delegate to the storage service.
93
99
- Run suite via `./mvnw test`.
94
100
101
+
## File Uploads & Profile Photos
102
+
103
+
-**Local mode (default):** files land under `uploads/` in the project root, exposed via `/uploads/**`. Override the directory URI via `filestorage.local.base-path` and `filestorage.local.public-uri-prefix`.
104
+
-**S3 mode:** set `filestorage.mode=s3` and provide `filestorage.s3.bucket-name`, `region`, credentials (`access-key`, `secret-key`) and optional `public-base-url` if you front it with CloudFront/CDN.
105
+
-**Cleanup toggle:**`filestorage.cleanup.enabled=true` removes the old file whenever a replacement upload succeeds; turn off to keep old revisions.
106
+
-**Multipart sizes:** controlled through `spring.servlet.multipart.max-file-size` / `max-request-size` (defaults to 10 MB but override via env vars).
|`POST /api/v1/users/me/profile-photo`| Authenticated user updates their own photo using the same payload. |
114
+
115
+
Responses return the updated `UserDto` with the resolved `profileImageUrl`. The storage layer exposes simple builder classes (`FileUploadRequest`, `StoredFile`) so future features (attachments, documents, etc.) can reuse the same abstraction without touching controllers.
116
+
95
117
## Scalability Hooks
96
118
97
119
-**Redis caching ready** (toggle with `app.caching.enabled` and provide Redis props)
0 commit comments