Files Control

Secure file upload management for Convex with access control, download grants, and automatic lifecycle cleanup.

Installation

npm install @gilhrpenner/convex-files-control

About Files Control

A convex files control component for Convex.

Benefits

Use cases

how to add file access control to Convex uploads

Files Control provides built-in access control for Convex file uploads with user-based permissions and role checking. It automatically validates upload permissions before allowing file storage and generates secure download grants with expiration times.

Convex file cleanup and lifecycle management

The component handles automatic file cleanup through configurable lifecycle policies that remove unused or expired files. You can set retention periods and cleanup schedules to prevent storage costs from growing unchecked.

secure temporary file downloads Convex

Files Control generates time-limited download grants that expire automatically, preventing unauthorized access to files. It creates secure URLs that work only for specific users and time periods without exposing permanent file access.

Frequently asked questions

How does Files Control handle file permissions in Convex?

Files Control implements permission layers that check user roles and ownership before allowing uploads or downloads. It integrates with Convex's authentication system to validate access rights and can generate temporary download grants with configurable expiration times.

Can Files Control automatically delete old files?

Yes, Files Control includes lifecycle management with configurable cleanup policies. You can set retention periods, schedule automatic cleanup jobs, and define rules for removing orphaned or expired files to control storage costs.

Does this work with existing Convex file storage?

Files Control builds on top of Convex's native file storage system, adding access control and lifecycle management without changing how files are stored. It works with existing Convex applications and can manage previously uploaded files.

How do I generate secure download links?

Files Control provides mutations that create time-limited download grants with user-specific access validation. These grants generate secure URLs that expire automatically and can be restricted to specific users or roles.

Links