Step images: upload, crop, variants, guarded media route #11
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of #1
Blocked by: #9
What
Up to three 4:3 images per step. See ADR-0006.
Acceptance criteria
StepImage(stepId, position, fileKey, originalWidth/Height, crop x/y/w/h)sharp: apply EXIF orientation, strip EXIF, crop, generate three WebP variants (thumb, medium, large) synchronouslyUPLOAD_DIRoutsidepublic/, random ids; original kept/media/[imageId]/[variant]checks effective visibility via #7; public →Cache-Control: public, immutable, internal →privateVocabulary:
GLOSSARY.md. Decisions:docs/adr/.Handed over from #10: the reading view currently shows a step's lines above its content (src/steps/components/GuideSteps.tsx). With step images, add the iFixit layout there: image area on the left, step lines on the right, content below.
Implemented in #25 (feature/11-step-images): StepImage model, 4:3 crop UI, sharp variants, UPLOAD_DIR storage behind an interface, guarded /media route with visibility-based caching, reorder/re-crop/delete, iFixit layout in the reading view. ADR-0006 updated.