Vercel Blob
Vercel Blob. BLOB_READ_WRITE_TOKEN is auto-injected on Vercel; pass token manually for local dev or other hosts.
Installation
@vercel/blob is an optional peer dependency of files-sdk - install alongside the SDK so the adapter's imports resolve at runtime.
Vercel Blob. The BLOB_READ_WRITE_TOKEN is auto-injected when deployed on Vercel; pass token manually for local dev or other hosts.
import { Files } from "files-sdk";import { vercelBlob } from "files-sdk/vercel-blob";// BLOB_READ_WRITE_TOKEN is auto-injected on Vercel.const files = new Files({ adapter: vercelBlob() });downloadTimeoutMs bounds the public-URL fetches issued by download() and the lazy bodies returned from head()/list(). Defaults to 5 minutes; pass 0 to disable. A hung CDN response would otherwise leak a fetch that never resolves.
access selects public or private blobs and is fixed at construction. Default "public" matches the existing behavior. With access: "private", uploads use Vercel's private mode and reads route through blob.get() with the token instead of a public URL fetch - there is no permanent public URL for private blobs, so url() throws. Need both? Use two adapters.
Limitations
signedUploadUrl() throws - browser uploads go through handleUpload() from @vercel/blob/client instead of presigned URLs. url() on public blobs returns the permanent CDN URL: expiresIn is silently ignored (no signing primitive) and responseContentDisposition throws (no override available). On access: "private", url() throws because there's no public URL - use download() instead. User metadata isn't supported by the underlying API, so it round-trips as undefined.