Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 2.87 KB

overview.md

File metadata and controls

48 lines (36 loc) · 2.87 KB

Content Module

Purpose

The content module turns uploaded, fetched, remote, or generated bytes into user-visible GeeSome content records and serves those records back through API-safe metadata, streams, previews, restore, and deletion flows.

Owns

  • Uploads from streams, local paths, URLs, directories, and remote storage IDs.
  • Content metadata creation, preview generation, public metadata, HEAD/stream serving, and restore flows.
  • Soft-delete/tombstone retention, purge-candidate listing, and purge execution after safety checks.
  • User content library lookup by content ID, storage ID, manifest ID, and owner-scoped storage identity.
  • Integration with storage-object sync so physical storage metadata can be shared across multiple content rows.

Boundaries

  • A Content row is a user/library record, not the global identity of physical bytes. Use the StorageObject registry for canonical physical metadata and shared references.
  • Do not hard-delete physical storage from content flows unless delete-safety and retention rules prove the storage object is no longer referenced.
  • Preview and generated-output references must stay visible to delete-safety and storage-space analysis.
  • Serving paths must preserve permission, deleted-state, range/header, and content-length behavior.
  • Re-upload or remote-import behavior must handle shared storageId values without assuming global content uniqueness.

Related Docs

Static image previews

New ordinary previews use WebP quality 85/effort 3. Small, medium and large fit inside 512/1024/2048 square bounds after auto-orientation, preserve aspect ratio/alpha, and never enlarge the source. The content pipeline inspects the source once and reuses the stored result when effective dimensions coincide.

A process-wide queue admits two metadata/encoding jobs and at most 32 waiters. Waiters expire after 10 seconds; active stream work has a 10-second deadline, with Sharp's native encode timeout as well. Inputs are bounded to 64 MiB and 40 million pixels. Rejection, corrupt input, timeout and disconnect close the source and release the slot. Normal optional-preview failure behavior remains; optimized publication still requires a successfully generated image preview.

Existing Content preview references stay authoritative on ordinary repeated saves and static-site builds. Explicit preview regeneration can create new CIDs; no background migration changes old content or immutable site/archive roots. Full-resolution publication codecs and policies are unchanged. Website icons use the existing driver: {raw: true} upload path to preserve original bytes without running this preview pipeline. See implementation and verification.