Skip to content

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:

FieldDescription
FileThe file to upload
TitleDisplay title for the document
DescriptionOptional summary of what the document contains
Requires authIf true, only signed-in users can access it
Schedule itemOptional link to a schedule item (appears on that item's detail page)
Sort orderDisplay order in the document list

Permission controls

After uploading, set access permissions:

Permission typeDescription
Public (no auth)Anyone can download (set requiresAuth to false)
Auth requiredOnly signed-in users can download
Email-specificOnly specific email addresses can access
Group-specificOnly 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

FieldDescription
FilenameOriginal uploaded filename
Content typeMIME type
SizeFile size in bytes
Uploaded byAdmin email who uploaded the file
Created/Updated atTimestamps

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:

  1. Verifies the user's session
  2. Checks document permissions (email/group matching)
  3. Streams the file from R2/filesystem with correct content type

Troubleshooting

SymptomFix
Upload failsCheck file size constraints and storage binding
Document not visible to attendeeVerify their email or group matches the document permissions
Download blockedHave the attendee sign out and back in; check permissions
Wrong file displayedUpdate the document metadata or re-upload the correct file
Order not updatingRe-submit the drag reorder action
Permission changes not taking effectPermissions are checked on each download request — clear browser cache and retry

Next steps

Released under the MIT License.