convex-file-storage

Solid

Complete file handling including upload flows, serving files via URL, storing generated files from actions, deletion, and accessing file metadata from system tables

Data & Documents 403 stars 30 forks Updated 4 months ago Apache-2.0

Install

View on GitHub

Quality Score: 86/100

Stars 20%
87
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Convex File Storage Handle file uploads, storage, serving, and management in Convex applications with proper patterns for images, documents, and generated files. ## Documentation Sources Before implementing, do not assume; fetch the latest documentation: - Primary: https://docs.convex.dev/file-storage - Upload Files: https://docs.convex.dev/file-storage/upload-files - Serve Files: https://docs.convex.dev/file-storage/serve-files - For broader context: https://docs.convex.dev/llms.txt ## Instructions ### File Storage Overview Convex provides built-in file storage with: - Automatic URL generation for serving files - Support for any file type (images, PDFs, videos, etc.) - File metadata via the `_storage` system table - Integration with mutations and actions ### Generating Upload URLs ```typescript // convex/files.ts import { mutation } from "./_generated/server"; import { v } from "convex/values"; export const generateUploadUrl = mutation({ args: {}, returns: v.string(), handler: async (ctx) => { return await ctx.storage.generateUploadUrl(); }, }); ``` ### Client-Side Upload ```typescript // React component import { useMutation } from "convex/react"; import { api } from "../convex/_generated/api"; import { useState } from "react"; function FileUploader() { const generateUploadUrl = useMutation(api.files.generateUploadUrl); const saveFile = useMutation(api.files.saveFile); const [uploading, setUploading] = useState(false); const handleUpload =...

Details

Author
waynesutton
Repository
waynesutton/convexskills
Created
4 months ago
Last Updated
4 months ago
Language
JavaScript
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category