mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-08-22 00:24:34 -05:00
Change R2_ envs to S3_
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user