Upload files to Bunny Storage CDN directly from Convex actions with automatic metadata tracking and multi-region support.
npm install convex-bunnyA Convex component that integrates Bunny.net's global CDN and storage service with your Convex backend. Upload files through Convex actions, store metadata in your database for reactive queries, and serve content through Bunny's edge network. Supports all Bunny Storage regions and provides automatic CDN URL generation with file management capabilities.
The Convex Bunny Storage component provides upload actions that send files to Bunny CDN and store metadata in your Convex database. You can upload base64-encoded files through Convex actions and get CDN URLs for immediate delivery.
Convex Bunny Storage automatically stores file metadata in your Convex database when uploading to Bunny CDN. This enables reactive queries to list files, check upload status, and manage file records alongside your application data.
The component supports all 7 Bunny Storage regions including DE, NY, LA, SG, SYD, BR, and JH. You configure the region during setup and the component handles CDN URL generation for your chosen endpoint.
Create a Storage Zone in your Bunny.net dashboard and copy the Storage Zone Password as your API key. You'll also need your CDN hostname in the format your-zone.b-cdn.net for the Convex Bunny Storage component configuration.
Yes, the Convex Bunny Storage component stores file metadata in your Convex database automatically. You can use listFiles queries and getFile queries to reactively display file information in your frontend components.
The Convex Bunny Storage component accepts base64-encoded file data with optional content-type specification. It supports any file format that Bunny Storage accepts, with files delivered through Bunny's global CDN infrastructure.
The Convex Bunny Storage deleteFile action removes files from both Bunny Storage and your Convex database metadata. You can also use removeFileRecord to delete only the database record while keeping the CDN file.