Task 8 — Attachments support & validation (images/files) in chat
Title: attachments: allow attaching uploads in messages and safe serving
Description
-
Support attachments via:
- Pre-upload to existing
POST /api/uploads/ (recommended) and include upload_id in message payload.
- Server resolves
upload_id and stores reference in message document attachments.
-
Validate attachment types and size server-side; reject disallowed types.
-
Serve attachment URLs via signed URLs or public S3 links (reuse Uploads service).
-
Tests for image attachment and reject invalid file.
Acceptance
- Messages created with attachments show attachment metadata and URLs in responses.
- Clients can download attachments using returned URLs.
Dependencies
- Uploads service (existing).
- Task 3 message service persists attachment references.
Notes
- For inline images show thumbnail url vs full url.
Task 8 — Attachments support & validation (images/files) in chat
Title: attachments: allow attaching uploads in messages and safe serving
Description
Support attachments via:
POST /api/uploads/(recommended) and includeupload_idin message payload.upload_idand stores reference in message documentattachments.Validate attachment types and size server-side; reject disallowed types.
Serve attachment URLs via signed URLs or public S3 links (reuse Uploads service).
Tests for image attachment and reject invalid file.
Acceptance
Dependencies
Notes