convex-file-storage

Automate file uploads, storage, and URL serving in Convex apps.

33|2|Updated Feb 21, 2025
One-click install
npx skills add https://github.com/yspreen/dotfiles --skill convex-file-storage-yspreen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-file-storage
Source: https://github.com/yspreen/dotfiles/tree/main/.agents/skills/convex-file-storage
Command: npx skills add https://github.com/yspreen/dotfiles --skill convex-file-storage-yspreen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a unified, reliable solution for uploading, storing, serving, and managing files within Convex apps, eliminating ad-hoc file handling.

Core Features & Use Cases

  • Upload URLs and client-side upload flows for images, documents, and generated files.
  • Serve files via automatically generated URLs with accessible metadata via the _storage table.
  • Save file references in your application database and enable safe deletion when no longer needed.
  • Use generated files from actions to power workflows like report generation and media hosting.

Quick Start

Upload a file to storage, retrieve its URL, and save a reference in your database.

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 and storage in a Convex app?

File storage in a Convex app is handled by generating upload URLs for client-side transfers, storing files in the system _storage table, and saving local database references to manage metadata and safe deletion.

How do I serve files via URL after uploading them to Convex storage?

To serve files via URL after uploading to Convex storage, the system automatically generates accessible URLs and retrieves associated file metadata directly from the _storage table for use in your application.

Can I use Convex for document management and user-generated content workflows?

Yes, Convex supports document management and user-generated content workflows by providing end-to-end file handling, including upload URL generation, metadata retrieval, and safe deletion when files are no longer needed.

What is the best way to manage generated files from Convex actions?

The best way to manage generated files from Convex actions is to store the outputs using the integrated file storage system, retrieve their URLs for serving, and save file references to enable safe deletion later.

How do you safely delete files and remove storage references in Convex?

To safely delete files in Convex, you remove the local storage references from your application database and then delete the actual file from the _storage table to prevent orphaned data and manage lifecycle correctly.