Skip to content
Go To Dashboard

File Storage

Persist and share files through short-lived presigned URLs — Sapiom mints the URLs and tracks metadata while the bytes flow directly between your client and object storage.

File storage is on the typed ctx.sapiom.* client, so sapiom_dev_agents_check validates the call at author time:

const { fileId, uploadUrl, requiredHeaders } =
await ctx.sapiom.fileStorage.upload({
contentType: "application/pdf",
fileName: "report.pdf",
fileSize: bytes.byteLength, // required
});
// PUT the bytes to uploadUrl with requiredHeaders, then share via getDownloadUrl(fileId)

upload, getDownloadUrl, list, setVisibility, and delete manage files. Autocomplete surfaces the full input and response types. See Using Capabilities.

From Claude Code or Codex, reach file storage through Sapiom Cloud MCP. Ask for the outcome in ordinary language; your coding agent can discover the current tool and input contract.

Outside an agent, call the same capability through the typed client—see the @sapiom/tools package:

const { downloadUrl } = await sapiom.fileStorage.getDownloadUrl(fileId);