Skip to content

Oversized photo attachments on medicine report form provide zero error feedback to users #995

@AnushKamble

Description

@AnushKamble

Which part of SahiDawa is broken?

Frontend - Next.js UI (apps/web)

Bug Description

When submitting a counterfeit medicine report through the web form at /report, users can attach photos of the suspicious medicine. If the attached image exceeds roughly 2MB, the file is silently discarded before upload and the form submits successfully without any indication that the attachment was dropped. The backend never receives the file, and the user believes their report includes photographic evidence when it doesn't.

Steps to reproduce:

  1. Open the counterfeit report form at /report
  2. Attach 2-3 photos taken with a smartphone camera (files ~3-5MB each)
  3. Observe the form displays "3 files attached" in the UI
  4. Submit the form - it shows "Report submitted successfully"
  5. Check the backend database - the report entry exists but has no image attachments

Expected Behavior

When a user attaches files exceeding the size limit, the form should display a visible error message (e.g., "Image too large - maximum 2MB per file") and prevent submission until the issue is resolved.

Actual Behavior

Files over 2MB are silently dropped from the upload queue. The form submits successfully without indicating that attachments were discarded.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

🔍 PR Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions