Finalize Avatar Upload
community-avatar-upload
Finalize Avatar Upload
Confirm S3 upload complete; run security gate; link avatar on CommunityProfile.
Security gate (design §5.2 — finalize): (a) contact JWT (b) resolve hub server-side + derive team_id (c) require_active_for_write membership check (d) file_id is in URL path — raw S3 keys never accepted (e) pre-finalize: File.team_id match + not deleted + created_by_contact_id match (f) MediaService.finalize_upload() (g) post-finalize: Media READY + asset_kind==image
- S3 HEAD content_type in allowlist + content_length ≤ 5MB (h) idempotent update_avatar()
POST
Finalize Avatar Upload
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.