skip to content
$worker

storage

v0.1.21

Object storage across AWS S3, GCS, Cloudflare R2, and a native local filesystem backend. Streamed uploads, signed URLs, and object change triggers.

iiiverified
242 installs0 in 7d0 today
install
$iii trigger compose::add worker=storage
binarylicense: Apache-2.0blobgcsobject-storager2s3
  • macOS: arm64 · x64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

10

storage::deleteObject

function

Delete an object. No-op when the object does not exist.

request
  • bucketstringrequired
  • keystringrequired
  • version_idstring
response
  • deletedbooleanrequired

storage::getObject

function

Download a small object inline as base64 (10 MiB hard limit). This buffers and inflates the payload; use a presignUrl GET for files and large objects.

request
  • bucketstringrequired
  • keystringrequired
  • version_idstring
response
  • body_base64stringrequired
  • content_typestringrequired
  • etagstringrequired
  • last_modifiedstring· date-timerequired
  • sizeinteger· uint64requiredmin 0

storage::headObject

function

Fetch object metadata (size, ETag, content-type, last-modified) without downloading the body.

request
  • bucketstringrequired
  • keystringrequired
  • version_idstring
response
  • content_typestringrequired
  • etagstringrequired
  • last_modifiedstring· date-timerequired
  • sizeinteger· uint64requiredmin 0

storage::listBuckets

function

List configured worker-facing storage buckets and their providers.

request
empty object
response
  • bucketsobject[]required
    • namestringrequired
    • providerstringrequired

storage::listObjects

function

List objects and common prefixes in a bucket with provider-native pagination.

request
  • bucketstringrequired
  • cursorstring
  • delimiterstring

    Directory separator. Use `/` for the bucket/folder explorer; omit it for a flat recursive listing.

  • limitinteger· uint32min 0
  • prefixstring
response
  • common_prefixesstring[]required
  • next_cursorstring
  • objectsobject[]required
    • content_typestring
    • etagstringrequired
    • keystringrequired
    • last_modifiedstring· date-timerequired
    • sizeinteger· uint64requiredmin 0

storage::on-config-change

function

Internal: transactionally apply the authoritative storage configuration without restarting the worker.

request
  • idstring
response
  • okbooleanrequired

storage::presignPost

function

Issue a short-lived multipart/form-data POST for direct browser upload. The file never buffers in the engine or worker RPC path.

request
  • bucketstringrequired
  • content_typestringrequired
  • expires_in_secondsinteger· uint64min 0
  • keystringrequired
  • max_size_bytesinteger· uint64min 0

    Optional upload cap enforced while the HTTP body is streamed.

response
  • expires_atstring· date-timerequired
  • fieldsobjectrequired
  • urlstringrequired

storage::presignUrl

function

Issue a short-lived URL the browser can hit directly to PUT or GET an object.

request
  • bucketstringrequired
  • content_typestring
  • expires_in_secondsinteger· uint64min 0
  • keystringrequired
  • methodstringrequiredenum: GET, PUT
  • response_content_dispositionstring

    GET-only: override `Content-Disposition` header on the served response. Rejected with `INVALID_PRESIGN_PARAMS` if set on a PUT presign.

  • response_content_typestring

    GET-only: override `Content-Type` header on the served response. Rejected with `INVALID_PRESIGN_PARAMS` if set on a PUT presign.

response
  • expires_atstring· date-timerequired
  • urlstringrequired

storage::putObject

function

Upload a small object inline as base64 (10 MiB hard limit). This buffers and inflates the payload; use presignPost or a presignUrl PUT for files and large objects.

request
  • body_base64stringrequired

    Base64-encoded small body (10 MiB decoded hard limit). The legacy field name `body` is accepted as an alias for backward compatibility.

  • bucketstringrequired
  • cache_controlstring
  • content_typestring
  • keystringrequired
  • metadataobject
response
  • etagstringrequired
  • sizeinteger· uint64requiredmin 0
  • version_idstring

storage::ui-content

function

Serve the storage worker's injected console UI assets (content function for its console:script / console:style triggers).

request
  • pathstringrequired

    The asset path from the trigger config (e.g. `state/page.js`).

response
  • contentstringrequired

    The asset source, verbatim.

  • content_typestringrequired

    MIME type the console should serve the asset with.

triggers

2

storage::object-created

trigger

Fires when an object is written to a configured bucket whose notifications source is wired up.

invocation
valueunknown
return
valueunknown

storage::object-deleted

trigger

Fires when an object is removed from a configured bucket whose notifications source is wired up.

invocation
valueunknown
return
valueunknown