Radondocs

Radon Storage

One unified, provider-agnostic API for 26 file-storage providers — object storage, CDN/media, self-hosted, and dev/local. Write storage.upload() once and swap providers with a config change, never a code change.

@radonsdk/storage gives you one typed APIupload, download, delete, getUrl, list, exists, getMetadata, copy — that every one of 26 storage providers implements. Provider-specific quirks (AWS SigV4, Azure Shared Key, Alibaba OSS V1, token headers, virtual-hosted vs path-style URLs, XML vs JSON responses, multipart protocols) are absorbed inside each adapter and never leak into your code.

storage.ts
import { RadonStorage } from "@radonsdk/storage";

const storage = new RadonStorage({
  providers: { s3: { bucket: "uploads", region: "us-east-1" } }, // creds from RADON_S3_*
  defaultProvider: "s3",
});

// Upload bytes, a stream, text, or straight from a file path:
const { key, url } = await storage.upload({ key: "avatars/ada.png", path: "./ada.png" });

// A time-limited signed URL for a private object:
const link = await storage.getUrl("avatars/ada.png", { signed: true, expiresIn: 3600 });

Switching to Cloudflare R2, Supabase, or Azure Blob later is a one-line config change — the upload() call above never changes.

Own your data, no lock-in

Radon runs in your backend against your provider keys. There's no hosted service, no per-object fee from Radon, and the SDK never stores your secrets. Every provider's wire protocol is hand-rolled, so there are zero required dependencies — no @aws-sdk/*, no @azure/*, no @supabase/*.

What's in the box

Free vs. Pro

Three providers are free and need no license: S3, Cloudflare R2, and the local filesystem. The other 23 providers — plus the resumable-upload and multi-provider failover features — are Pro Pro and unlock with a single Radon Pro license that covers every SDK in the suite.

TierCapability
Frees3, r2, local — no license, no init()
Proevery other provider + resumable/chunked upload + failover + bring-your-own providers

Gating is a licensing concern only — every adapter, free or Pro, is built to the same completeness bar: real API calls, real signed URLs, and multipart wherever the provider supports it.

Two features are Pro even on a free provider

Uploading a large file to S3 with the normal upload() is free. Doing it via the resumable multipart path, or putting S3 behind a failover chain, is a Pro feature — set a licenseKey and call await storage.init().

On this page