Docs
  • 0.57.0latest
  • 0.56.0
  • 0.55.0
  • 0.54.0
  • 0.53.0
  • 0.52.1
  • 0.52.0
  • 0.51.0
  • 0.48.0
  • 0.47.0
  • 0.46.0
  • 0.45.0
  • 0.44.0
  • 0.43.0
  • 0.42.0
  • 0.41.0
  • 0.40.0
  • 0.39.6
  • 0.39.5
  • 0.39.3
  • 0.39.2
  • 0.39.1
  • 0.39.0
  • 0.38.4
  • 0.38.2
  • 0.38.1
  • 0.37.1
  • 0.37.0
  • 0.36.2
  • 0.36.1
  • 0.36.0
  • 0.35.3
  • 0.35.2
  • 0.35.1
  • 0.35.0
  • 0.34.4
  • 0.34.3-beta
  • 0.34.2-beta
  • 0.34.1-beta
  • 0.34.0-beta
  • 0.33.4-beta
  • 0.33.3-beta
  • 0.33.2-beta
  • 0.33.1-beta
  • 0.33.0-beta
  • 0.32.0-beta

Files and signed URLs

Bucket bytes over HTTP — list, put, get, delete — and expiring signed URLs that serve one object with no credential, minted only by a caller who could read it.

A bucket holds bytes that are not a document — images, exports, uploads. The app surface serves the whole life of an object:

methodpathanswers
GET…/buckets/{b}/objectsthe listing — a query over the bucket's metadata records, taking the records grammar
PUT…/objects/{path…}body is the bytes, raw; 201 {"written": true}
GET…/objects/{path…}the bytes (application/octet-stream) or 404
DELETE…/objects/{path…}200 {"deleted": true}

The path keeps its slashes — /avatars/ada/full.png is one object — and is percent-decoded by the node. The listing is a metadata query, so it filters and pages exactly like a record list.

curl -X PUT -H "Authorization: Bearer $TOKEN" \
  --data-binary @avatar.png \
  'http://127.0.0.1:8000/v1/app/main/buckets/media/objects/avatars/ada.png'

curl -H "Authorization: Bearer $TOKEN" \
  'http://127.0.0.1:8000/v1/app/main/buckets/media/objects/avatars/ada.png' -o out.png

Signed URLs

A page cannot send your Bearer token to an <img> tag. A signed URL is the answer: an expiring URL that serves one object with no credential at all.

curl -X POST -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  'http://127.0.0.1:8000/v1/app/main/buckets/media/sign' \
  -d '{"path": "/avatars/ada.png", "expires": 600}'
# {"url":"http://127.0.0.1:8000/v1/app/main/buckets/media/objects/avatars/ada.png?expires=…&signature=…","expires":600}

Hand that URL to the browser and it works until its deadline. The rules that make it safe:

  • Minting is a read. The node checks that you may read the object before it signs — a caller who may not read it cannot mint a URL for it.
  • The serve resumes your authority. The read the URL stands for runs as the signer at signing time, so an account change — a narrowed grant, a disabled user — kills every URL that signer minted, the same way it kills their tokens.
  • Tampering is a 403. The signature covers every fact of the URL: change the path, the deadline or anything else and it stops verifying. An unknown, altered or expired signature is refused identically, so probing learns nothing.
  • Signed URLs die with the node. They are held in memory like tokens; a restart invalidates them, and a page that cached one re-signs.

The expires you ask for is a ceiling in seconds; the answer echoes the deadline the node recorded, which is the one to trust.