Storage Architecture
Directus uses a driver-based storage system that abstracts file operations across different storage backends.Storage Manager
TheStorageManager class coordinates storage drivers and locations:
Supported Storage Drivers
Directus supports multiple storage backends out of the box:Local Storage
Store files on the server filesystem:Amazon S3
Store files in AWS S3 or S3-compatible services:Google Cloud Storage
Integrate with GCS:Azure Blob Storage
Use Microsoft Azure:Cloudinary
Leverage Cloudinary’s media management:Supabase Storage
Driver Operations
All storage drivers implement a consistent interface:Reading Files
Writing Files
File Operations
Chunked Uploads (TUS Protocol)
Directus supports resumable uploads via the TUS protocol for large files:File Upload API
Upload files via the REST API:Multipart Upload
Image Transformations
Transform images on-the-fly using query parameters:Transformation Options
- width / height - Resize dimensions
- fit - Resize mode (cover, contain, inside, outside)
- quality - JPEG/WebP quality (1-100)
- format - Output format (jpg, png, webp, tiff, avif)
- transforms - JSON array of transformations
Advanced Transformations
File Metadata
Files in Directus include comprehensive metadata:Folder Organization
Organize files using folders:Multiple Storage Locations
Configure multiple storage locations for different use cases:Security
Access Control
Control file access with permissions:Download Tokens
Generate temporary download links:Best Practices
Use CDN for Production
Use CDN for Production
Place a CDN in front of your
/assets endpoint for better performance and reduced server load.Organize with Folders
Organize with Folders
Create a logical folder structure (e.g., by year, category, or project) to keep assets organized.
Leverage Multiple Storage Locations
Leverage Multiple Storage Locations
Use local storage for development, cloud storage for production, and specialized services like Cloudinary for optimized delivery.
Set Appropriate File Size Limits
Set Appropriate File Size Limits
Configure
FILES_MAX_UPLOAD_SIZE based on your storage capacity and use TUS for large files.