File storage service and image upload API #27
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#27
Loading…
Reference in New Issue
Block a user
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?
Context
Images pasted into pages are stored on the uploads volume with quota accounting (ADR 0011).
Scope
Implement
FileStorage(filesystem binding, layoutuploads/<pondId>/<fileId>),attachmentsmodel,POST /ponds/:id/files(multipart; MIME sniffing; images only for now — the general allowlist arrives in M6; size limit viaQuotaService; storage quota consumption),GET /media/:fileId(permission-checked streaming, correct Content-Type,nosniff, cache headers),DELETE /files/:id(quota release).Acceptance criteria
pond_usage.storage_bytes_usedmatches actual volume content in a testTechnical notes
Dependencies
Depends on #22, #23.
Size: ~1.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Implemented in
0fae699and closed viaCloses #27. Pipeline verification for that commit:All acceptance criteria covered by
apps/api/src/files/files.e2e.db.test.ts: upload/serve roundtrip (bytes + sniffed content type), non-image rejection, magic-byte check (renamed.html-as-.png), oversize vs. storage-quota-exceeded as distinct errors, delete releases quota and removes the on-disk bytes, and a soft-deleted page's attachment stays reachable (no eager purge).