Ponder

Storage

Storage bucket configuration and Flutter upload behavior for profile images.

Bucket: profile_images

Purpose: stores user profile photos uploaded from the edit-profile flow.

Setting Value
Bucket ID profile_images
Name profile_images
Enabled true
File security true
Maximum file size 5242880 bytes, 5 MB
Allowed extensions jpg, jpeg, png, webp, heic, heif
Compression none
Encryption true
Antivirus true
Bucket permissions create("users"), read("any")

Upload Flow

EditProfileScreen accepts profile images from the gallery through image_picker or from files through file_picker. It validates the same extension list as the bucket and rejects files larger than 5 * 1024 * 1024 bytes before calling ProfileService.uploadProfilePicture.

ProfileService.uploadProfilePicture writes the file to profile_images with:

The returned file ID is converted into a view URL by buildProfileImageViewUrl, then written to users.profilePictureUrl.

Cleanup

When a managed profile image is replaced or removed, ProfileService.deleteManagedProfilePicture extracts the managed file ID from the previous URL and deletes it from the bucket. A missing old file with Appwrite code 404 is ignored.

Not Declared In Repository Configuration

Image dimensions, image transformation rules, and MIME-type restrictions beyond filename-derived content type are not declared in appwrite.json or enforced by the Flutter code.