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>
13 lines
332 B
TypeScript
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;
|