Installation
@repo/storage is a workspace package. Three entry points are available:
// Client components and utilities
import { FileInput, Image, ClientFileManager } from '@repo/storage'
// Server-side file management
import { ServerFileManager, FilesRepository } from '@repo/storage/server'
// Database schema
import { createFilesTable } from '@repo/storage/database'
Environment Variables
S3_ACCESS_KEY_ID=your_access_key
S3_SECRET_ACCESS_KEY=your_secret_key
PRIVATE_S3_ENDPOINT=http://localhost:9000
BODY_SIZE_LIMIT=100M
| Variable | Description |
|---|---|
S3_ACCESS_KEY_ID | S3 access key |
S3_SECRET_ACCESS_KEY | S3 secret key |
PRIVATE_S3_ENDPOINT | S3 endpoint URL (server-side) |
BODY_SIZE_LIMIT | Max upload size for SvelteKit |
For public file serving, also set PUBLIC_S3_ENDPOINT in your public env.