Skip to content
AI Primer
release

Files SDK 2.0 adds files-sdk/api gateway and React, Vue, Svelte clients

Files SDK 2.0 adds a gateway module, browser clients, server adapters, and a shadcn/ui registry around one storage API. The release turns a server-side wrapper into a full-stack file layer with scoped auth, range downloads, and versioned operations.

4 min read
Files SDK 2.0 adds files-sdk/api gateway and React, Vue, Svelte clients
Files SDK 2.0 adds files-sdk/api gateway and React, Vue, Svelte clients

TL;DR

You can jump from the docs link to the changelog link, and one reply about adapter escape hatches adds a useful caveat: the server framework packages are helper utilities, not a locked routing layer. Archil's adapter announcement also shows the SDK's adapter surface was already expanding before 2.0, including S3-adjacent workflows like bucket branching and running bash over stored data.

Gateway

The biggest structural change is files-sdk/api. Hayden Bleasel describes it as a mount-once gateway that exposes upload, download, list, search, URL generation, copy, move, delete, capability checks, and signed upload URLs through one shape.

The auth model is unusually tight for a storage SDK. Hayden Bleasel says operations are deny-by-default and can be scoped with key prefixes, expiries, read-only constraints, and origin allowlists.

Browser clients

Files SDK 2.0 stops at neither server helpers nor raw fetch wrappers. Hayden Bleasel says the browser side now includes a framework-agnostic createFilesClient plus useFiles packages for React, Vue, and Svelte.

The hook surface is broad enough to look like an app layer, not just upload glue:

  • upload progress
  • errors
  • useList
  • useFile
  • useSearch

That is the part that makes the "portable file layer" line in Hayden Bleasel's framing post land. The same verbs now show up from gateway to browser client instead of living only on the server side.

Streaming and file lifecycle

The transport details are more serious than the launch headline suggests. Downloads can either redirect or proxy stream, and proxy mode supports byte-range responses with HTTP 206 plus aborting upstream reads when the client disconnects.

Uploads also split into two paths, according to Hayden Bleasel's transport post:

  • keyless presign → complete tokens
  • proxy fallback when the server must stay in the request path

Versioning and soft delete also flow through to the client when the underlying Files instance is wrapped with versioning() or softDelete(). Hayden Bleasel says that unlocks methods for versions, restore, trash listing, restoring trashed files, and purge, while keeping scoped auth in place.

UI registry

The shadcn/ui registry is the most turnkey part of the release. Instead of shipping only hooks, the package now includes installable UI tied directly to useFiles.

The registry components listed in Hayden Bleasel's UI registry post are:

  • dropzone
  • file browser with breadcrumbs
  • search
  • preview
  • share dialog
  • upload progress
  • file actions
  • version history
  • trash bin

Adapters and escape hatches

Server bindings now cover Next, Hono, Express, Fastify, Koa, Elysia, Nitro, SvelteKit, Astro, Bun, and Deno, and Hayden Bleasel says the handlers stay Web-native across Node and edge adapters where the runtime permits it.

One reply added a useful implementation detail: Hayden Bleasel's adapter reply says the framework integrations are helper utilities with an escape hatch, so teams can customize the route shape with /api instead of accepting a fixed mount.

A separate adapter thread from archildata's adapter announcement shows the ecosystem angle. Archil says its native adapter targets apps that already use S3 storage but also need branched buckets or native bash execution over that data, which is a more ambitious target than simple upload and download plumbing.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 3 threads
TL;DR3 posts
Browser clients1 post
Adapters and escape hatches1 post
Share on X