convex-file-storage

Implement Convex file upload, storage, serving, and deletion workflows.

1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/cgRGM/rivercitymd --skill convex-file-storage-cgrgm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-file-storage
Source: https://github.com/cgRGM/rivercitymd/tree/main/.cursor/skills/convex-file-storage
Command: npx skills add https://github.com/cgRGM/rivercitymd --skill convex-file-storage-cgrgm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the complexity of building reliable file upload, storage, retrieval, and deletion flows in Convex applications.

Core Features & Use Cases

  • Upload Flow Setup: Generate upload URLs, send files from the client, and persist storage references in your database.
  • File Serving and Display: Retrieve stable file URLs for images, PDFs, and downloads so users can view or access stored content.
  • Storage Lifecycle Management: Handle generated files, inspect storage metadata, and clean up both storage records and database references when files are removed.
  • Use Case: A product team can let customers upload profile images, preview them immediately, and later replace or delete them without leaving orphaned files behind.

Quick Start

Ask for a Convex file storage implementation that includes upload, save, serve, metadata lookup, and deletion paths for your app.

Frequently Asked Questions about convex-file-storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle file uploads in Convex with React?

Convex file uploads require generating a short-lived upload URL on the server, sending the file from the React client, and persisting the resulting storage ID in your database. This workflow ensures secure file uploads by decoupling the transfer from your API routes.

How do I retrieve and serve stored files using Convex?

Retrieve stable file URLs for serving images, PDFs, and downloads by querying your database for the storage ID. Convex generates a URL that allows users to view or access stored content directly from the client without exposing your backend storage layer.

What is the best way to delete files in Convex without leaving orphaned records?

The best way to delete files in Convex is to remove the file from storage and simultaneously delete its database reference. This cleanup process prevents orphaned storage records and ensures your database metadata stays synchronized with your actual file storage.

Does Convex file storage support generated files and metadata inspection?

Yes, Convex file storage supports storing generated files and inspecting their metadata. You can retrieve content-type information and storage metadata to verify file properties before serving them to users or applying further processing logic.

How do I manage content-type handling for uploaded files in a Convex application?

Manage content-type handling by inspecting storage metadata after the upload completes. Convex tracks the content-type sent during the client-side upload, allowing you to validate image, document, and generated-file formats before persisting the database reference.