Directus provides a flexible storage abstraction layer that allows you to store and manage files across different storage providers. This abstraction enables you to seamlessly switch between local file systems and cloud storage services without changing your application code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/directus/directus/llms.txt
Use this file to discover all available pages before exploring further.
Storage Architecture
The storage system consists of:- Storage Manager - Central management interface for registering drivers and locations
- Storage Drivers - Provider-specific implementations (Local, S3, Azure, GCS, Cloudinary, Supabase)
- Storage Locations - Named storage configurations that use a specific driver
Available Drivers
Directus supports the following storage drivers:- Local - Store files on the local file system
- S3 - Amazon S3 and S3-compatible storage (DigitalOcean Spaces, MinIO, etc.)
- Azure - Azure Blob Storage
- Google Cloud Storage - Google Cloud Storage
- Cloudinary - Cloudinary media management platform
- Supabase - Supabase Storage
Configuration
Storage is configured using environment variables. You need to:- Define which storage locations to use
- Configure each location with a driver and options
Basic Configuration
Multiple Storage Locations
You can configure multiple storage locations:Driver Interface
All storage drivers implement a common interface with the following methods:Core Methods
read(filepath, options?)- Read a file as a streamwrite(filepath, content, type?)- Write a file from a streamdelete(filepath)- Delete a filestat(filepath)- Get file metadata (size, modified date)exists(filepath)- Check if a file existsmove(src, dest)- Move a filecopy(src, dest)- Copy a filelist(prefix?)- List files with optional prefix filter
TUS Protocol Support
Some drivers support resumable uploads via the TUS protocol:createChunkedUpload(filepath, context)- Initialize a chunked uploadwriteChunk(filepath, content, offset, context)- Write a chunk of datafinishChunkedUpload(filepath, context)- Complete the uploaddeleteChunkedUpload(filepath, context)- Cancel and delete an upload
Resumable Uploads
Directus supports resumable uploads using the TUS protocol. Configure it globally:Root Path
Most drivers support aroot configuration option to prefix all file paths:
- Organizing files in a shared bucket
- Multi-tenant configurations
- Separating environments (dev/staging/production)