API Reference

useConvexUpload

Reference for the shared upload wrapper built on top of useConvexStorage.

useConvexUpload wraps the upload flow around useConvexStorage.

Import

Nuxt
const { upload, isUploading, progress, error } = useConvexUpload()
Vue
import { useConvexUpload } from 'vue-convex/storage'

Signature

function useConvexUpload(options?: {
  generateUploadUrl?: () => Promise<string>
  onSuccess?: (storageId: string, file: File) => void | Promise<void>
  onError?: (error: Error) => void
}): {
  upload: (file: File) => Promise<string | null>
  isUploading: Readonly<Ref<boolean>>
  progress: Readonly<Ref<number>>
  error: Readonly<Ref<Error | null>>
}

Behavior

  • Client-only; calling upload() during SSR returns null and sets an error
  • Uses fetch() to send the file to the signed upload URL
  • Sets progress to 0 before the request and 100 after success
  • Does not expose byte-level incremental upload progress
Copyright © 2026