Description
The upload route exists, but there is still room for a more complete media pipeline with stronger validation, metadata extraction, and safe handling of user files.
User Story
As a user,
I want to upload media safely,
so that posts and profiles can support rich content without breaking the app.
Requirements and Context
- Files:
app/app/api/uploads/route.ts, app/lib/media-utils.ts, app/lib/image-compression.ts, app/lib/file-validation.ts
- Enforce file type, size, and extension validation
- Extract metadata and normalize image uploads consistently
- Return stable upload responses for both post media and avatar use cases
Suggested Implementation
// MEDIA PIPELINE
// 1. Validate file type and size.
// 2. Normalize and compress supported images.
// 3. Store metadata for downstream consumers.
// 4. Reject unsafe or malformed uploads.
Acceptance Criteria
Submission Guidelines
- Branch:
feat/media-processing
- Depends on: upload and media utility modules
- PR:
feat(backend): harden media validation and processing
Description
The upload route exists, but there is still room for a more complete media pipeline with stronger validation, metadata extraction, and safe handling of user files.
User Story
As a user,
I want to upload media safely,
so that posts and profiles can support rich content without breaking the app.
Requirements and Context
app/app/api/uploads/route.ts,app/lib/media-utils.ts,app/lib/image-compression.ts,app/lib/file-validation.tsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/media-processingfeat(backend): harden media validation and processing