MinIO/S3 File Storage
S3-compatible object storage using the MinIO client, supporting both MinIO and Amazon S3.
GridFS Conflict
If you're using a preset that includes GridFS (like base or all), you must unregister the GridFS adapter before using MinIO:
import { FileDirector } from '@unchainedshop/file-upload';
import '@unchainedshop/plugins/files/minio';
// Unregister GridFS adapter loaded by presets
FileDirector.unregisterAdapter('shop.unchained.file-upload-plugin.gridfs');
Installation
import '@unchainedshop/plugins/files/minio';
The plugin automatically registers when environment variables are configured.
Environment Variables
| Variable | Default | Description |
|---|---|---|
MINIO_ENDPOINT | - | MinIO/S3 endpoint URL (required) |
MINIO_BUCKET_NAME | - | Storage bucket name (required) |
MINIO_ACCESS_KEY | - | Access key for authentication |
MINIO_SECRET_KEY | - | Secret key for authentication |
MINIO_REGION | - | Storage region |
MINIO_UPLOAD_PREFIX | - | Prefix for uploaded file paths |
MINIO_STS_ENDPOINT | - | STS endpoint for temporary credentials |
AMAZON_S3_SESSION_TOKEN | - | AWS session token for temporary access |