# File stores

A **file store** is durable storage for files. Create a file store, attach it to projects, upload files via presigned URLs.

## Create a file store

```ts
const { data: store } = await client.fileStore.create({
  body: { name: "customer-docs" },
})
```

## Attach to a project

```ts
await client.pod.project.fileStore.add({
  path: { podId, id: projectId },
  body: { fileStoreId: store.id },
})
```

## Upload a file

```ts
const { data: presigned } = await client.fileStore.files.presignUpload({
  path: { id: store.id },
  body: { path: "reports/2026-04.pdf", contentType: "application/pdf" },
})

await fetch(presigned.url, {
  method: "PUT",
  body: fileBlob,
  headers: { "Content-Type": "application/pdf" },
})
```

## Download a file

```ts
const { data: presigned } = await client.fileStore.files.presignDownload({
  path: { id: store.id },
  query: { path: "reports/2026-04.pdf" },
})

const bytes = await fetch(presigned.url).then((r) => r.arrayBuffer())
```

## Related

- **[Memory stores](/concepts/memory-stores)** — for agent memory, not raw files.
- **API reference:** [File stores](/api-reference#tag/file-store)