Attachments for guides (#97) #117
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/97-attachments"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #97.
UPLOAD_DIRunderattachments/, served by/media/attachments/<id>with the guide's visibility check (ADR-0006). Always a download:application/octet-stream,Content-Disposition: attachment(UTF-8 name plus ASCII fallback),nosniff, sandboxing CSP.MZheader; firmware and G-code stay allowed, ELF is not detected.POST /media/attachmentswith the raw file as body instead of a Server Action, whose body limit is fixed at build time; the route checksOrigin.GuideVersionAttachmentlets/mediafind ones only a version still has, discard and restore bring them back, and a file is deleted only when neither a working copy nor a version references it.20261105220000_add_guide_attachmentsadds two tables.Tests: unit tests for the rules (
src/attachments/rules.test.ts), access (src/attachments/access.test.ts), versioned content and the setting; e2e ine2e/attachments.spec.ts. Typecheck, lint, 490 unit and 63 e2e tests pass.Open questions:
public, immutablelike image variants, so shared caches may keep them after a guide turns internal.🤖 Generated with Claude Code