farfield · docs

blobs

blobs.farfield.systems

Image and media storage with content-addressed identifiers. Every uploaded file gets a CIDv1 sha-256 hash as its address. Raw bytes are stored on Cloudflare R2; metadata lives in SQLite. Because a blob's CID is the hash of its bytes, GET /blobs/{cid} is immutable — cache it forever.

Screenshot of the Farfield blobs UI
Blobs admin library in the logged-in state. Media bytes are public by CID; mutation requires auth.

Public API

GET /blobs/{cid}
Raw bytes — strong ETag, Cache-Control: public, max-age=31536000, immutable
GET /blobs/{cid}/meta
BlobMeta — dimensions, blurhash, dominant colour
GET /blobs?page=N
{ "blobs": [BlobMeta, …], "total": N, "page": N, "pages": N }
GET /status
{ "service": "blobs", "ok": true, "blobs": N }

Upload (POST /blobs) and delete (DELETE /blobs/{cid}) require an API key.

Record Shape

BlobMeta

{
  "cid": "bafk…",
  "size": 12345,
  "mime": "image/jpeg",
  "width": 1920,
  "height": 1080,
  "blurhash": "LEHV6nWB2yk8pyo0adR*.7kCMdnj",
  "dominantColor": "#7a5c3e"
}