Files
desa-darmasaba/src/lib/minio.ts
nico 6fc79f7541 feat(storage): migrate file storage from local disk to MinIO
Replace local filesystem-based image storage with MinIO S3-compatible
object storage. All upload, serve, delete, and list operations now use
the MinIO bucket defined in MINIO_* env vars.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 11:40:43 +08:00

13 lines
332 B
TypeScript

import { Client } from "minio";
const minioClient = new Client({
endPoint: process.env.MINIO_ENDPOINT!,
accessKey: process.env.MINIO_ACCESS_KEY!,
secretKey: process.env.MINIO_SECRET_KEY!,
useSSL: process.env.MINIO_USE_SSL === "true",
});
export const MINIO_BUCKET = process.env.MINIO_BUCKET!;
export default minioClient;