managarten/services/mana-core-auth/src/storage
Till JS e64c298cec refactor(auth,planta): optimize storage usage
mana-core-auth:
- Replace manual key generation (Date.now) with generateUserFileKey()
- Replace manual validateFileSize with maxSizeBytes in upload()
- Remove OnModuleInit — init storage directly in constructor
- Add upload hooks for structured logging
- Remove redundant getPublicUrl() fallback chain (presigned URL for 1 year)
- Add deleteAllUserAvatars() for account deletion
- Simplify getAvatarUploadUrl() using storage.getPublicUrl()

planta:
- Replace createStorageClient() with manual config by createPlantaStorage()
- Replace manual uuid + path construction with generateUserFileKey()
- Remove uuid dependency for key generation
- Add maxSizeBytes validation (20MB)
- Add cacheControl header (immutable, 1 year)
- Add upload hooks for structured logging
- Add error handling in deletePhoto()
- Add deleteAllUserPhotos() for account deletion
- Make getPhotoUrl() synchronous (was async unnecessarily)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:59:14 +01:00
..
index.ts feat(auth): add avatar upload with S3/MinIO and subscription plans seed 2026-02-13 23:06:24 +01:00
storage.controller.ts feat(auth): add avatar upload with S3/MinIO and subscription plans seed 2026-02-13 23:06:24 +01:00
storage.module.ts feat(auth): add avatar upload with S3/MinIO and subscription plans seed 2026-02-13 23:06:24 +01:00
storage.service.ts refactor(auth,planta): optimize storage usage 2026-03-20 20:59:14 +01:00