Change R2_ envs to S3_

This commit is contained in:
Jared Schoeny 2025-10-16 00:30:53 -10:00
parent 110a6a70cd
commit 3550d32b37

View File

@ -4,11 +4,11 @@ let cachedClient: Client | null = null;
export function getMinioClient(): Client {
if (cachedClient) return cachedClient;
const endPoint = process.env.R2_ENDPOINT!;
const port = parseInt(process.env.R2_PORT!);
const accessKey = process.env.R2_ACCESS_KEY_ID!;
const secretKey = process.env.R2_SECRET_ACCESS_KEY!;
const useSSL = process.env.R2_USE_SSL! === "true";
const endPoint = process.env.S3_ENDPOINT!;
const port = parseInt(process.env.S3_PORT!);
const accessKey = process.env.S3_ACCESS_KEY_ID!;
const secretKey = process.env.S3_SECRET_ACCESS_KEY!;
const useSSL = process.env.S3_USE_SSL! === "true";
cachedClient = new Client({ endPoint, accessKey, secretKey, useSSL, port });
return cachedClient;