MinIO
MinIO and other self-hosted S3-compatible servers. Path-style addressing on by default; region defaulted; errors relabelled.
Installation
@aws-sdk/client-s3, @aws-sdk/s3-presigned-post, and @aws-sdk/s3-request-presigner are optional peer dependencies of files-sdk - install alongside the SDK so the adapter's imports resolve at runtime.
npm install files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presignerUsage
import { Files } from "files-sdk";
import { minio } from "files-sdk/minio";
const files = new Files({
adapter: minio({
bucket: "uploads",
endpoint: "http://localhost:9000",
// accessKeyId / secretAccessKey auto-loaded from
// MINIO_ACCESS_KEY_ID / MINIO_SECRET_ACCESS_KEY
}),
});Options
Prop
Type
Compatibility
| Method | Status | Notes |
|---|---|---|
upload | ✅ | |
download | ✅ | |
delete | ✅ | |
list | ✅ | |
search | ✅ | |
head | ✅ | |
exists | ✅ | |
copy | ✅ | |
url | ✅ | |
signedUploadUrl | ✅ |