Documents
Share files with attendees using permission-controlled document management.
Quick outcome
The document system lets organizers upload and share files (itineraries, maps, guides, waivers) with attendees. Documents support fine-grained access control — restrict by email, group, or require authentication. Documents can optionally be linked to schedule items.
Setup
Documents are available by default. Storage is handled by the runtime:
- Production: Cloudflare R2
- Local dev: Filesystem at
apps/event-site/data/objects/
Day-to-day management
Uploading documents
Navigate to /admin/documents/new:
| Field | Description |
|---|---|
| File | The file to upload |
| Title | Display title for the document |
| Description | Optional summary of what the document contains |
| Requires auth | If true, only signed-in users can access it |
| Schedule item | Optional link to a schedule item (appears on that item's detail page) |
| Sort order | Display order in the document list |
Permission controls
After uploading, set access permissions:
| Permission type | Description |
|---|---|
| Public (no auth) | Anyone can download (set requiresAuth to false) |
| Auth required | Only signed-in users can download |
| Email-specific | Only specific email addresses can access |
| Group-specific | Only members of specific groups can access |
Permissions are managed through the document_permissions table, which supports both email and group types.
Managing documents
From /admin/documents:
- View all uploaded documents with metadata
- Reorder documents by dragging
- Click to edit title, description, and permissions
- Delete documents (removes both the record and the stored file)
Document metadata
| Field | Description |
|---|---|
| Filename | Original uploaded filename |
| Content type | MIME type |
| Size | File size in bytes |
| Uploaded by | Admin email who uploaded the file |
| Created/Updated at | Timestamps |
Attendee experience
Document list
Attendees visit /documents (requires sign-in) to see available documents:
- Documents display with title, description, and file size
- Only documents the user has permission to access are shown
- Documents linked to schedule items may also appear on those schedule pages
Downloading
Click a document to download it. Files are served through the authenticated proxy at /api/documents/[...key], which:
- Verifies the user's session
- Checks document permissions (email/group matching)
- Streams the file from R2/filesystem with correct content type
Troubleshooting
| Symptom | Fix |
|---|---|
| Upload fails | Check file size constraints and storage binding |
| Document not visible to attendee | Verify their email or group matches the document permissions |
| Download blocked | Have the attendee sign out and back in; check permissions |
| Wrong file displayed | Update the document metadata or re-upload the correct file |
| Order not updating | Re-submit the drag reorder action |
| Permission changes not taking effect | Permissions are checked on each download request — clear browser cache and retry |
Next steps
- Schedule — link documents to schedule items
- People & Access — manage groups for document permissions
- Photos — manage the photo gallery