Storage
Client SDK
Browser-side storage methods.
import { createClient } from "@buildspacestudio/sdk/client";
const bs = createClient(process.env.NEXT_PUBLIC_BUILDSPACE_PUBLISHABLE_KEY!);
const uploaded = await bs.storage.upload(file, { path: `uploads/${file.name}` });
const url = await bs.storage.getUrl(uploaded.key);
const objects = await bs.storage.list("uploads/");
await bs.storage.delete(uploaded.key);