Cloud Storage
ShipFlutter uses Firebase Cloud Storage to store and serve user files. The storage module provides a simple interface for common operations like uploading user avatars.
Setup
-
Create a default Cloud Storage bucket in your Firebase Console
-
Deploy the default storage rules:
-
The rules will be deployed from
storage.rules
:
Storage Service
The StorageService
class provides a type-safe way to interact with Cloud Storage:
File Organization
ShipFlutter follows this storage structure:
Directoryusers/
Directory$userId/
- avatar // User profile picture
Directoryfiles/ // User uploaded files
- …
Each user gets their own storage space under their user ID, ensuring proper isolation and security.