Skip to content

Feature: Add Avatar Upload and Processing API #87

Description

@3m1n3nc3

Description

Add signed avatar upload, validation, processing, finalization, replacement, and deletion.

File Location

learnault-api/src/domain/assets/, profile routes/services, storage adapter/worker, and tests

Design Reference

API Roadmap Phase 1: Add Avatar Upload and Processing API.

Dependencies

  • Status: Blocked
  • Blocked by: Feature: Replace Mock User Helpers with Profile API; Feature: Add Transaction Outbox and Job Delivery Foundation
  • Blocks: Integration suite

Tasks

  • Define storage provider and development fake
  • Issue short-lived user-scoped upload intent with size/type constraints
  • Verify image and queue scan/metadata/resize processing
  • Finalize approved variants atomically
  • Retire replaced assets per lifecycle policy
  • Test MIME spoofing, oversize, cross-user access, failures, replace, and delete

Acceptance Criteria

  • Users cannot finalize/delete another user's object
  • Invalid files never become active avatars
  • Storage credentials are never returned
  • Replacement/deletion follows policy
  • Tests/OpenAPI pass

Verification Evidence

  • Attach redacted upload flow and fake-provider security/processing tests

Difficulty

Advanced

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions