Skip to content

Media Library

Chukfi’s media library handles uploads, tagging, and serving — backed by Amazon S3 in production and the local filesystem during development.

Note: This video demonstrates a planned npm distribution. v0.2.0 ships as a Rust binary — see the Quick Start for current setup.

  • Drag-and-drop upload — Drop files into the browser, Chukfi handles MIME detection and storage
  • Type filtering — Filter by image, document, or all media types
  • S3-backed — Production media lives in an S3 bucket with lifecycle rules (Free Tier: 5 GB). Configure via AWS_ACCESS_KEY_ID and S3_BUCKET environment variables.
  • CLI support — Upload and list media from the terminal with chukfi media commands
Terminal window
chukfi media upload \
--path ./images/hero.png \
--alt "Hero banner image" \
--caption "Site hero banner" \
--json

Auto-detects MIME type from file extension. Uploads to S3 (if AWS credentials present) or the local filesystem.

Terminal window
# All images
chukfi media list --mime-type image/ --json
# Search by alt text or caption
chukfi media list --q banner --limit 20 --json
Flag Default Description
--mime-type none Filter by MIME type prefix (e.g. image/)
--q none Search in alt text and caption
--limit 50 Maximum items (max 100)
--offset 0 Pagination offset
--json false Output as JSON
Environment Backend
Local development Filesystem (./media/ directory)
Production Amazon S3

S3 storage is activated by setting AWS_ACCESS_KEY_ID (or AWS_PROFILE) and S3_BUCKET in your environment. The bucket itself must be provisioned separately — via the AWS console, CDK, or Terraform.