Blob runtime API

Reference for `blob`, `ensureBlob()`, and the core Blob types.

Use this page when you need the Blob surface area. For a guided first run, start with Quickstart.

Runtime exports

ExportUse it for
blobThe active storage handle for put, get, list, serve, delete, upload, and multipart flows.
ensureBlob(blob, options?)Validate file size and content type before storage.

Common handle methods

The blob handle exposes the common runtime methods:

  • put() to store file content
  • get() to read file content
  • list() to list stored objects
  • serve() to stream a stored object through an H3 route
  • del() to remove an object
  • handleUpload() for form-based uploads

Core types

TypeDescription
BlobStorageThe runtime storage handle type.
BlobPutOptionsOptions for writes such as content type and naming behavior.
BlobListOptionsOptions for listing and pagination.
BlobEnsureOptionsValidation rules for size and content type.
BlobObjectMetadata about a stored blob.