Receive Clear Validation Feedback When File Upload Fails or Violates Limits
The File Upload Screen performs client-side validation before any network request: file size must not exceed 10 MB and the activity must not already have 5 attachments. If either constraint is violated, a clear inline error message is shown immediately. Network upload failures (connectivity issues, storage errors) are also communicated with a descriptive message and a retry option. Given that many peer mentors are beginner-level users and some may be older adults, error messages must be plain-language and actionable, not technical jargon.
User Story
Acceptance Criteria
- Given the user selects a file larger than 10 MB, when client-side validation runs, then an error message clearly states 'File is too large. Maximum size is 10 MB.' before any upload attempt
- Given the activity already has 5 documents attached, when the user tries to add another, then a message clearly states the maximum of 5 documents per activity has been reached
- Given a valid file is selected and the upload fails due to a network error, when the error occurs, then a descriptive message is shown with a retry button
- Given an upload fails, when the user taps retry, then the upload resumes from the same file without requiring the user to re-select it
- Given all validations pass and the upload succeeds, when the process completes, then no error messages are shown and the user is returned to the activity summary with the new attachment visible
Business Value
Peer mentors are frequently beginner-level app users, some of whom are older adults or people with cognitive challenges. Opaque error messages lead to abandonment of the attachment flow, resulting in missing evidence records. Clear validation feedback ensures documentation compliance even for less tech-savvy users.
Components
- File Upload Screen ui
- Document Storage Service service
- Activity Document Repository data