Skip to main content
Examples use the blob client from Creating the client.
Object ids are opaque (pub/..., prv/...). Store them as returned, never build or parse them, and replace your stored id whenever update() returns a new one. See Object ids.

Listing

list() is an async generator that follows the cursor through every page. Order is not guaranteed.
listPage() fetches one page. Use it for manual pagination or to get folders:
A page has objects, folders (only with delimiter) and continuationToken (absent on the last page). Each listed object has id, size, created_at, expires_at, private, url and etag. See Object List.

Object details

Returns id, size, content_type, etag, created_at, expires_at, private, url, cache_control, content_disposition, original_name, metadata and legacy. See Object Info.
created_at is the storage’s last-modified time: an update that copies the object (visibility, expiration, headers) resets it.
  • A public object gets its permanent CDN URL, with expires_at: null.
  • A private object, or any call with disposition or filename, gets a temporary link that lives expires seconds (up to 24 hours).
A temporary link cannot be revoked. For revocable, password-protected or download-capped links, use a share.
The result has url, expires_at, private, size and content_type. See Object Download.

Updating objects

update() changes the visibility, expiration, cache, disposition or metadata of one object or up to 50. It always returns an array, one result per object, and each result reports its own success in ok.
A successful result (ok: true) has object (the id you sent), changed, id (the id after the change), private, url, expires_at and size. A failed result (ok: false) has object and code. A batch does not throw for per-object failures. See Object Update.

Deleting

Deletion is immediate and permanent: there is no trash.
With a single id in an array, the SDK still returns { deleted, not_found, failed }: a missing object goes to not_found, and DELETE_FAILED or PREFIX_NOT_ALLOWED go to failed instead of throwing. Any other error (authentication, rate limit, network) still throws. See Delete Objects.

Copying, moving and renaming

Both run on the server, without downloading the file.
move(source, destination, options) is copy() with move: true. The result has id, private, url, expires_at, size, source, moved and replaced. See Object Copy.
update(), delete(), copy() and move() are writes: they get a single attempt and are never retried. See Retry policy.

Next steps

Sharing

Links that expire, count downloads or ask for a password.

Objects API reference

The REST endpoints behind these methods.