Cloudflare R2 for blob storage, via NuxtHub's core utilities.
Nuxfire uses Cloudflare R2 for blob storage — profile pictures and team logos today.
It uses the @nuxt-hub/core module's utilities for this specifically, even though the database is Postgres via Hyperdrive rather than a NuxtHub-managed store (see Database): NuxtHub's self-hosted mode expects a binding literally named BLOB (fixed by NuxtHub itself), so the R2 bucket is named to match rather than being deployed through NuxtHub's own platform.
// NuxtHub's self-hosted mode expects this binding named exactly BLOB —
// that's fixed by NuxtHub itself, not something `link` can rename.
link.push(
database,
new sst.cloudflare.Bucket("BLOB"),
new sst.cloudflare.Kv("KV"),
new sst.cloudflare.Kv("CACHE"),
emails,
);
// Delete the old profile picture before storing the new one
const previousKey = user.image.slice(baseUrl.length);
if (previousKey.startsWith("profile/")) {
try {
await hubBlob().del(previousKey);
} catch {
// didn't exist
}
}
Nuxfire Production Kit
Ready to build and launch your SaaS?
Get 100% full source code ownership, zero proprietary wrappers, and architecture engineered for millions of requests on Cloudflare.