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 API — upload, 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.
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
Quickstart
Upload a file and read it back through a signed URL in under five minutes.
Core concepts
Providers, the storage contract, keys, capabilities, and how swapping works.
Uploading
Body vs. path, content-type inference, metadata, cache control, and copy.
Signed URLs
Public vs. signed URLs, expiry, presigned PUT uploads, per-provider support.
Resumable uploads
Chunked multipart uploads for large files.
Failover
An ordered chain of providers, tried in turn until one succeeds.
Listing
Paginated list(), getMetadata(), and exists().
Providers
All 26 providers, their credentials, and their quirks.
API reference
Every method, option, and return type.
Errors
Every typed error, its .code, and when it's thrown.
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.
| Tier | Capability |
|---|---|
| Free | s3, r2, local — no license, no init() |
| Pro | every 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.