Configuration
Storage
Local and S3 storage configuration.
Swush supports local disk storage and S3-compatible object storage.
Local storage
Set:
STORAGE_DRIVER=localUPLOAD_ROOT=/absolute/path
Files are stored under UPLOAD_ROOT/{userId}/....
S3 storage
Set:
STORAGE_DRIVER=s3S3_ENDPOINTS3_REGIONS3_BUCKETS3_ACCESS_KEYS3_SECRET_KEYS3_FORCE_PATH_STYLE(true for MinIO)
Switching
Changing storage backends does not migrate existing files. Plan a migration if you already have data.
When you have already uploaded files on S3, you can switch to Local and still view them, as long as you don't delete the S3 data in environment variables. And vice verse for Local to S3. This allows you to switch back and forth without losing access to your files, but it also means you need to keep the old storage credentials if you want to access old files after switching.