GoLiveKit
Storage

S3 Storage

Configure and use S3-backed file uploads with presigned URLs.

Overview

The app uses direct-to-S3 uploads:

  1. Client requests a presigned upload URL from oRPC.
  2. Client uploads file bytes directly to S3 using PUT.
  3. Client finalizes upload through oRPC, creating a file record in database.

This keeps upload traffic off the app server and stores file metadata for later usage.

Required Environment Variables

.env
S3_REGION=us-east-1
S3_BUCKET=your-bucket
S3_ACCESS_KEY_ID=your-access-key
S3_SECRET_ACCESS_KEY=your-secret-key
S3_ENDPOINT=https://s3.amazonaws.com # optional (for S3-compatible providers)

App Configuration

Common storage defaults are defined in src/config/app.ts under APP_CONFIG.files.storage:

  • keyPrefix
  • presignedUrlExpiresInSeconds
  • maxFileSizeBytes
  • maxFilesCount
  • acceptedTypes

Per-field upload settings from form builder can restrict uploads further, but cannot exceed global max limits.

API Endpoints

Files router exposes two public endpoints:

  • POST /files/create-presigned-upload-url
  • POST /files/finalize-upload

If the request is authenticated, userId is attached to created file metadata.

Form Builder Integration

Form builder supports a file field type with:

  • acceptedTypes
  • maxFileSizeBytes
  • maxFilesCount

The field uploads files immediately via dropzone and stores uploaded file metadata (including direct url) in form state.

On this page