FileStorageService
Component Detail
Infrastructure
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Abstracts the underlying object storage provider (e.g. S3-compatible storage) for uploading, retrieving, and deleting binary attachment files. It generates pre-signed URLs for secure direct access and handles multipart upload logic for larger files. All file operations go through this service to ensure consistent access control and storage conventions.
file-storage-service
Sources & reasoning
Line 107 names document attachments under NHF's unique needs with specific examples (invitations, Facebook screenshots) and the Bufdir verification rationale. The priority matrix at line 157 confirms NICE TO HAVE with Phase 2 placement. Blueprint assigns [v1.0] matching the Fase 2 ordinal.
-
docs/source/likeperson.md · line 107Dokumentvedlegg til aktiviteter: Invitasjoner, Facebook-skjermbilder m.m. - viktig for Bufdir-etterprøving.
-
docs/source/likeperson.md · line 157Dokumentvedlegg til aktiviteter | - | ✓ | - | - | ✓ | NICE TO HAVE | 2
Responsibilities
- Upload binary file data to the configured object storage bucket
- Generate time-limited pre-signed URLs for secure file retrieval
- Delete stored files when attachments are removed
- Manage multipart upload sessions for files exceeding size thresholds
- Apply consistent naming conventions and folder structure for stored files
Interfaces
upload(key: string, data: Buffer, mimeType: string): Promise<string>
getPresignedUrl(key: string, expirySeconds: number): Promise<string>
delete(key: string): Promise<void>
initiateMultipartUpload(key: string): Promise<UploadSession>