Case Study: MIME Mismatch Blocking Legitimate Uploads

A production-style incident where strict type checks rejected real user files and how policy was corrected.

security document image code

Signal

Upload success rate dropped after a validation rollout. Rejections clustered under a type-mismatch reason code even for files users considered valid.

Root Cause

Policy treated browser-reported MIME as authoritative, while several legitimate files had empty or inconsistent client-side MIME values. Signature checks were available but not used as final authority.

Fix

  • Promote signature and parser checks to primary decision signal.
  • Use extension and header MIME as secondary hints.
  • Introduce clear mismatch classes: hard-block, soft-review, allow.

Regression Guard

Added mixed-manifest fixture tests and alerting on mismatch-rate spikes to detect policy drift early.

Recommended Tools

MIME Inspector

Compare extension and signature hints to detect type mismatches.

Open Tool

Upload Test Matrix Builder

Generate reusable API test cases from manifest input.

Open Tool