mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-04-21 14:37:15 -05:00
Change R2_ envs to S3_
This commit is contained in:
parent
110a6a70cd
commit
3550d32b37
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user