# Storage Service ## First Release ### Http Endpoints - Public Upload temp Binary File/Image (HTTP Multipart: File Binary and JSON Metadata) - Bucket: `{App}-{Tenant}` Example: `Check-Dev` - Directory: `{Module}/{Entity-EntityId}/` Example: `Survey/Answers-926a987f-2506-4bd9-8aa0-df5f2377029c/` - Public Download Binary File/Image by Id - Public Get File/Image Metadata by Id - Public Download Image Thumbnail Metadata by Id - TBD: Should we return thumbnail as part of metadata endpoint or separate endpoint ### Queue Events (Service to Service) - **Listener:** Confirm Uploaded Files (Save Temp Files and Remove Expire Time) - **Listener:** Delete Uploaded Files (Set Status to Deleted and set Expire Time) ### Settings - Settings Levels - Global Server Settings - `Future:` Global Module Settings - `Future:` Global Entity Settings - `Future:` App-Tenant Settings - `Future:` App-Tenant Module Settings - `Future:` App-Tenant Entity Settings - TBD: Each setting levels should add more restriction or allow override the previous level (`and` vs `or` relation) - Settings should be pre-processed and cached on memory - Settings: - Max-Upload Size - Allowed File Extensions - `Future:` Max-Upload Size per Extension - Allowed App-Tenants - Allowed App -> Modules -> Entities ### Internal Abstractions - Upload Pipeline - `Future:` Access Control - File Validation - File Processing/Encoding - `Future:` Access Policy/Guard (Tenant Based, Module Bases, File Type Based, User Based) - File Validators (Magic-Number, File-Size-Limiter, File-Type, File-Name, ...etc) - File Processors (Metadata Definition, Image WebP Conversion, Image Thumbnail Generator) ## Future Releases ### Http Endpoints - Public Upload temp Base64 File/Image - Public Download Base64 File/image by Id - Chunk Upload (parallel, resume) - Chunk Download (parallel, resume) - List Entity Files By Entity Id - Label Files and Search By Label - Compress and Download All Entity Files - Private (Authorized and Access Control) - Upload temp Binary File/Image (HTTP Multipart: File Binary and JSON Metadata) - Upload temp Base64 File/Image - Download Binary File/Image by Id - Download Base64 File/image by Id - Get File/Image Metadata by Id - Download Image Thumbnail Metadata by Id