API Reference

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

Nuxt
const storage = useConvexStorage()
Vue
import { useConvexStorage } from 'vue-convex/storage'

Signature

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

Setup requirements

In Nuxt, enable convex.storage: true.

In standalone Vue, install convexVueStorage:

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 reactive ref backed by a live query
  • remove(storageId) calls the configured delete mutation
Copyright © 2026