Break work

This commit is contained in:
2026-01-20 09:38:07 -05:00
parent d83c02759a
commit 4fbd3be324
36 changed files with 3117 additions and 2770 deletions

20
src/server/storage.ts Normal file
View File

@@ -0,0 +1,20 @@
import { S3Client } from "@aws-sdk/client-s3";
import { env } from "~/env";
const globalForS3 = globalThis as unknown as {
s3Client: S3Client | undefined;
};
export const s3Client =
globalForS3.s3Client ??
new S3Client({
region: env.MINIO_REGION ?? "us-east-1",
endpoint: env.MINIO_ENDPOINT,
credentials: {
accessKeyId: env.MINIO_ACCESS_KEY ?? "minioadmin",
secretAccessKey: env.MINIO_SECRET_KEY ?? "minioadmin",
},
forcePathStyle: true, // Needed for MinIO
});
if (env.NODE_ENV !== "production") globalForS3.s3Client = s3Client;