Skip to content

User Guide

The user guide covers every feature of filestore in depth. If you haven't already, start with the Quick Start.

Topics

Guide Description
Storage Engines Local, memory, S3, GCS, and Azure — configuration and behavior
Presigned URLs Direct-to-cloud uploads and downloads, plus object deletion
Validation File size limits, extension filters, content-type checks
Callbacks Dynamic filenames, destinations, filters, and metadata
Multi-Field Uploads Handling multiple upload fields per request
Reading Results Working with Store and FileData models
Error Handling Exception hierarchy and graceful failure patterns
Production Checklist Security, resource limits, observability, and deployment guidance

Architecture Overview

graph TD
    A["HTTP Request"] --> B["FastAPI Dependency"]
    B --> C["FileStore.__call__()"]
    C --> D["Parse Form Data"]
    D --> E["For each FileField"]
    E --> F["Resolve Filename"]
    F --> G["Validate Types & Size"]
    G --> H["Run Filters"]
    H --> I["Resolve Metadata & Destination"]
    I --> J["StorageEngine.save()"]
    J --> K["FileData Result"]
    K --> L["Build Store"]
    L --> M["Return to Endpoint"]

Every step in the pipeline is configurable through StoreConfig or callbacks. Store-level and field-level configuration is validated and merged once when the FileStore is constructed, so per-request overhead stays minimal.