Implement media API routes #23

Closed
opened 2026-05-19 19:51:45 -05:00 by erik · 2 comments
Owner

Goal

Implement Slugkit media management routes backed by the template media storage service.

Spec: docs/specs/07-media-routes.md

Requirements

  • Implement all media routes, request handling, response shapes, and validation from the spec.
  • Use S3-compatible media storage service for uploads and deletes.
  • Persist media metadata in SQLite.
  • Return public media URLs suitable for use in posts.
  • Validate file size and allowed MIME types.
  • Use shared auth, validation, not-found, and storage error shapes.
  • Document every route in OpenAPI with the operation IDs from the spec.
  • Add tests for upload, list/get if specified, delete, validation, and OpenAPI coverage.

Acceptance criteria

  • Can upload media through /api/v1/media as documented.
  • Upload creates storage object and database record.
  • Response includes the documented media metadata and public URL.
  • Can delete media through the documented route.
  • Unsupported type and oversized uploads fail with shared validation errors.
  • Every media route appears in OpenAPI with documented operation IDs.
  • Relevant lint/test checks pass.

Dependencies

  • task-c272cbda
  • task-36204c4c
## Goal Implement Slugkit media management routes backed by the template media storage service. Spec: `docs/specs/07-media-routes.md` ## Requirements - Implement all media routes, request handling, response shapes, and validation from the spec. - Use S3-compatible media storage service for uploads and deletes. - Persist media metadata in SQLite. - Return public media URLs suitable for use in posts. - Validate file size and allowed MIME types. - Use shared auth, validation, not-found, and storage error shapes. - Document every route in OpenAPI with the operation IDs from the spec. - Add tests for upload, list/get if specified, delete, validation, and OpenAPI coverage. ## Acceptance criteria - [ ] Can upload media through `/api/v1/media` as documented. - [ ] Upload creates storage object and database record. - [ ] Response includes the documented media metadata and public URL. - [ ] Can delete media through the documented route. - [ ] Unsupported type and oversized uploads fail with shared validation errors. - [ ] Every media route appears in OpenAPI with documented operation IDs. - [ ] Relevant lint/test checks pass. ## Dependencies - task-c272cbda - task-36204c4c
Author
Owner

Synced from todu comment by @todu on 2026-06-03T20:04:46.026Z

PR Review

PR: #88

Review result: approved

Acceptance criteria: 7 total, 7 met, 0 missing

Blocking issues: 0
Warnings: 0

Verification:

  • ./scripts/pre-pr.sh passed locally.
  • Forgejo CI status for CI / build-lint-test (pull_request) is success.

Verdict: Approved. Ready for human merge approval.

_Synced from todu comment by @todu on 2026-06-03T20:04:46.026Z_ ## PR Review PR: https://forge.caradoc.com/erik/slugkit/pulls/88 Review result: approved Acceptance criteria: 7 total, 7 met, 0 missing Blocking issues: 0 Warnings: 0 Verification: - `./scripts/pre-pr.sh` passed locally. - Forgejo CI status for `CI / build-lint-test (pull_request)` is `success`. Verdict: Approved. Ready for human merge approval.
erik 2026-06-03 21:59:42 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-04T02:55:27.032Z

Completed

  • Implemented media API routes for upload, metadata lookup, and delete, backed by media storage and SQLite metadata.
  • Verified merge evidence: PR #88 was approved with 7/7 acceptance criteria met and ./scripts/pre-pr.sh plus Forgejo CI / build-lint-test (pull_request) passing.
  • Verified current branch evidence: main includes merge commit 952deb6 for PR #88 (feat: add media API routes).
_Synced from todu comment by @todu on 2026-06-04T02:55:27.032Z_ ### Completed - Implemented media API routes for upload, metadata lookup, and delete, backed by media storage and SQLite metadata. - Verified merge evidence: PR #88 was approved with 7/7 acceptance criteria met and `./scripts/pre-pr.sh` plus Forgejo `CI / build-lint-test (pull_request)` passing. - Verified current branch evidence: `main` includes merge commit `952deb6` for PR #88 (`feat: add media API routes`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#23
No description provided.