Attach a Photo or Document to an Activity Registration
An optional attachment step allows the peer mentor to capture a photo using the device camera, select an image from the gallery, or pick a document from the file system. Up to three attachments per registration are allowed. Attachments are compressed before upload and stored in Supabase Storage with a signed URL. The attachment is linked to the activity record in the database. This step is skipped by default (the user must deliberately open it) to preserve the speed of the common registration flow.
User Story
Acceptance Criteria
- Given the registration confirmation view is shown, when I tap 'Add Attachment', then I can choose between 'Camera', 'Photo Library', and 'File' options
- Given I select a photo from the library, when the attachment is processed, then it is compressed to under 1 MB and a thumbnail preview is shown on the confirmation view
- Given I have attached two files, when I attempt to add a fourth, then an error message informs me the maximum of three attachments per registration has been reached
- Given I submit a registration with attachments, when the coordinator opens the activity detail, then all attached thumbnails are visible and tapping one opens a full-size preview
- Given my connection is poor, when I submit with attachments, then the text record is saved immediately and attachments upload in the background with a progress indicator in the activity detail
Business Value
NHF explicitly requires document attachments (event invitations, screenshots) for Bufdir verification. Without this capability, NHF peer mentors must maintain a separate manual process for evidence collection, increasing administrative overhead and creating gaps in the audit trail. This feature also enables expense receipt attachment for reimbursement-eligible activities.
Components
- Registration Confirmation View ui
- Activity Registration Cubit service
- Attachment Picker UI ui
- Attachment Thumbnail Grid ui
- Attachment Preview Modal ui
- Attachment Upload Service service
- Signed URL Service service
- Activity Attachment Repository data
- Supabase Storage Adapter infrastructure
- Receipt Image Compressor service