Skip to content
Browse documentation
typescript sdk

Filesystem, S3 and R2

Select an optional storage implementation without widening the common blob contract.

Choose the native storage host

storage-filesystemcreateFilesystemBlobAdapter(directory): private local storage; the host owns the directory and recovery.
storage-s3createS3BlobAdapter({ bucket, client }): AWS SDK configuration and credentials remain server-owned; close on shutdown.
storage-r2createR2BlobAdapter(env.OBJECTS): inject a native R2Bucket binding; no AWS SDK is required.
import { createS3BlobAdapter } from "@smoothie-framework/storage-s3";
import { createR2BlobAdapter } from "@smoothie-framework/storage-r2";

Qualify the deployment you choose

Filesystem recovery must not run against active writes. S3 transport attempts are fixed to one so uncertain writes remain visible to the application. Native R2 cannot hard-abort an active put; the adapter joins its actual outcome.

Local fixtures establish adapter behavior, not remote credentials, deliverability or every provider endpoint. Test your selected deployment separately. R2 storage support does not imply a D1 database or a complete Worker-hosted application.