From 08d75fd75c063bd17d2471b263452b490910338b Mon Sep 17 00:00:00 2001 From: Mert Demir Date: Thu, 1 Feb 2024 07:00:19 +0900 Subject: Support for additional S3 providers (#71) * support for other s3 providers * remove redundant route options * use type safe env * prettier --- src/lib/env.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/env.ts') diff --git a/src/lib/env.ts b/src/lib/env.ts index 33b835d..f1d59db 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -17,12 +17,14 @@ const envSchema = z S3_UPLOAD_SECRET: z.string().optional(), S3_UPLOAD_BUCKET: z.string().optional(), S3_UPLOAD_REGION: z.string().optional(), + S3_UPLOAD_ENDPOINT: z.string().optional(), NEXT_PUBLIC_ENABLE_RECEIPT_EXTRACT: z.coerce.boolean().default(false), OPENAI_API_KEY: z.string().optional(), }) .superRefine((env, ctx) => { if ( env.NEXT_PUBLIC_ENABLE_EXPENSE_DOCUMENTS && + // S3_UPLOAD_ENDPOINT is fully optional as it will only be used for providers other than AWS (!env.S3_UPLOAD_BUCKET || !env.S3_UPLOAD_KEY || !env.S3_UPLOAD_REGION || -- cgit v1.3