From e987b6ac9838b0e1a9033a63d53e6d9215008fab Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 17 Jan 2023 13:57:41 +0800 Subject: [PATCH] fix(nocodb): handle undefined env for NC_ATTACHMENT_FIELD_SIZE --- packages/nocodb/src/lib/constants/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/constants/index.ts b/packages/nocodb/src/lib/constants/index.ts index c2fdcb32cf..193325228d 100644 --- a/packages/nocodb/src/lib/constants/index.ts +++ b/packages/nocodb/src/lib/constants/index.ts @@ -1,4 +1,3 @@ export const NC_LICENSE_KEY = 'nc-license-key'; export const NC_APP_SETTINGS = 'nc-app-settings'; -export const NC_ATTACHMENT_FIELD_SIZE = - +process.env['NC_ATTACHMENT_FIELD_SIZE'] || 20 * 1024 * 1024; // 20 MB +export const NC_ATTACHMENT_FIELD_SIZE = +(process.env['NC_ATTACHMENT_FIELD_SIZE'] || 20 * 1024 * 1024); // 20 MB