---
title: "useConvexStorage"
description: "Reference for the shared storage helper exposed from the storage entrypoint."
canonical_url: "https://nuxt-convex.onmax.me/api-reference/use-convex-storage"
---
# useConvexStorage

> Reference for the shared storage helper exposed from the storage entrypoint.

`useConvexStorage` gives you the low-level storage primitives after the storage feature is configured.

## Import

```ts [Nuxt]
const storage = useConvexStorage()
```

```ts [Vue]
import { useConvexStorage } from 'vue-convex/storage'
```

## Signature

```ts
function useConvexStorage(): {
  generateUploadUrl: () => Promise<string>
  getUrl: (storageId: MaybeRefOrGetter<string | null | undefined>) => Readonly<Ref<string | null>>
  remove: (storageId: string) => Promise<void>
}
```

## Setup requirements

In Nuxt, enable `convex.storage: true`.

In standalone Vue, install `convexVueStorage`:

```ts [src/main.ts]
app.use(convexVueStorage, {
  generateUploadUrl: api.storage.generateUploadUrl,
  getUrl: api.storage.getUrl,
  remove: api.storage.remove,
})
```

## Behavior

- `generateUploadUrl()` calls the configured mutation through the realtime client
- `getUrl(storageId)` returns a ref backed by a live query. It follows a reactive `storageId` and is `null` while loading or when the id is empty. Call it in `setup()`: each call subscribes in the current scope
- `remove(storageId)` calls the configured delete mutation

## Related pages

- [File Storage](https://nuxt-convex.onmax.me/vue-guide/file-storage)
- [useConvexUpload](https://nuxt-convex.onmax.me/api-reference/use-convex-upload)


## Sitemap

See the full [sitemap](https://nuxt-convex.onmax.me/sitemap.md) for all pages.
