Skip to content

File store backend: blob interface + attachments/images (design first) #83

Description

@andywithcamera

Gap (from Andy): Completely unrelated to the catalog lane — Velm has no way to store/attach files (uploads, images, attachments) anywhere today. No multipart handlers, no blob backend, no upload surface in the repo.

What this is

A first-class file store so app records can hold attachments (documents) and images, with previews where sensible. Backed by a pluggable blob store interface so the backend can grow from filesystem to S3/object storage.

Existing precedent / constraints

  • Self-hostable, open-core AGPL, Postgres-based.
  • No upload handlers exist today (grep: zero multipart/upload/blob/FileServer). This is greenfield infra.
  • docs-* surfaces are markdown-backed, unrelated.

Proposed shape (draft, needs Andy's call)

  • Blob store interface (Put/Get/Delete/Stat) with a filesystem-backed implementation first, S3 as an open vs closed adapter (open-core question — decide).
  • Storage keying: app-scoped IDs for attachments (map to the record model). Content-addressed (sha256) only if we want cross-record dedupe — lean no for attachments, keep simple.
  • Upload handler: MIME allow-list, size caps, multipart ingestion.
  • Attachment field type on records (stores file reference, renders a download/preview, surfaces backlinks).

Open questions (Andy to decide)

  1. Files where physically? (fs vs S3-first; pluggable interface assumed)
  2. S3 adapter open or closed-core?
  3. MIME allow-list + max size defaults.
  4. Thumbnails/previews auto-generated (Go-side, no heavy native deps)?

Definition of done

  • Blob interface + filesystem backend implemented & tested.
  • Upload endpoint + attachment field type wired into records.
  • Previews/thumbnails for images.
  • Configurable blob store.

See session memory /space/project for the conversation that sparked this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions