---
name: bijection-uploadthing
description: "Evaluate and integrate the Uploadthing component with Bijection."
---

# Uploadthing

UploadThing file tracking, access control, and cleanup for Bijection.

- Package: @bijectionhq/uploadthing
- Category: Storage
- Status: Preview
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/uploadthing/tree/34b7e03992f9de1f0d986284d01bc8a0afb93b05
- Upstream: https://github.com/raymond-UI/uploadthingtrack/tree/6d448ae8fa1625487831e5500f783c405f39489f
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/uploadthing

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/uploadthing.git
cd uploadthing
git checkout 34b7e03992f9de1f0d986284d01bc8a0afb93b05
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @mzedstudio/uploadthingtrack. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


# UploadThing

## Instructions

Use UploadThing to track uploadthing files in convex with automated access control, expiration cleanup, and webhook verification for secure file management. This Convex component integrates directly with your backend.

### Installation

```bash
npm install @mzedstudio/uploadthingtrack
```

### Capabilities

- Automatically clean up expired files with configurable TTL policies
- Secure file access with built-in permission controls and ownership validation
- Verify UploadThing webhooks with cryptographic signature validation
- Track file metadata and usage patterns across your Convex application

## Examples

### how to automatically delete uploaded files after expiration in Convex

UploadThing Track provides configurable TTL policies that automatically clean up expired files from both UploadThing and your Convex database. It runs scheduled functions to identify and remove files based on access patterns and expiration rules you define.

### secure file access control with UploadThing and Convex

The component implements ownership validation and permission checks before serving file URLs. It tracks who uploaded each file and validates access requests against your defined authorization rules.

### verify UploadThing webhook signatures in Convex

UploadThing Track automatically validates webhook signatures using cryptographic verification to ensure requests actually come from UploadThing. It handles the signature validation and parses webhook payloads for file lifecycle events.

### track file metadata and usage in Convex database

The component stores comprehensive file metadata including upload timestamps, file sizes, access counts, and ownership information in your Convex database. This enables analytics and informed cleanup decisions based on actual usage patterns.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by UploadThing is not needed

## Troubleshooting

**Does UploadThing Track work with existing UploadThing integrations?**

Yes, UploadThing Track is designed to work alongside existing UploadThing implementations. It operates as a tracking layer that monitors file lifecycle events through webhooks without interfering with your current upload flows or file serving.

**How does the automatic file cleanup prevent accidentally deleting active files?**

UploadThing Track uses configurable TTL policies combined with access tracking to identify truly unused files. It monitors file access patterns and only removes files that meet both age and inactivity criteria you define, protecting actively used files from deletion.

**What webhook events does the component handle from UploadThing?**

UploadThing Track processes upload completion, deletion, and error events from UploadThing webhooks. It verifies each webhook signature cryptographically and updates your Convex database with the latest file status and metadata changes.

**Can I customize the access control rules for different file types?**

Yes, UploadThing Track allows you to define custom permission functions that can check user roles, file ownership, and file metadata before granting access. You can implement different access patterns for different file types or user groups within your Convex functions.

## Resources

- [npm package](https://www.npmjs.com/package/%40mzedstudio%2Fuploadthingtrack)
- [GitHub repository](https://github.com/raymond-UI/uploadthingtrack)
- [Live demo](https://ephemera-upt-demo.vercel.app)
- [Convex Components Directory](https://www.convex.dev/components/mzedstudio/uploadthingtrack)
- [Convex documentation](https://docs.convex.dev)