From 476d33797a415d4a58660017cba16cb311c94260 Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 26 Jun 2025 12:22:51 +0800 Subject: [PATCH] . --- chatdesk-ui/db/storage/files.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chatdesk-ui/db/storage/files.ts b/chatdesk-ui/db/storage/files.ts index 33cdbc1..06eef84 100644 --- a/chatdesk-ui/db/storage/files.ts +++ b/chatdesk-ui/db/storage/files.ts @@ -9,13 +9,13 @@ export const uploadFile = async ( file_id: string } ) => { - const SIZE_LIMIT = parseInt( - process.env.NEXT_PUBLIC_USER_FILE_SIZE_LIMIT || "104857600" - ) - + // const SIZE_LIMIT = parseInt( + // process.env.NEXT_PUBLIC_USER_FILE_SIZE_LIMIT || "104857600" + // ) + const SIZE_LIMIT = Number(process.env.NEXT_PUBLIC_USER_FILE_SIZE_LIMIT) || 104857600; if (file.size > SIZE_LIMIT) { throw new Error( - `File must be less than ${Math.floor(SIZE_LIMIT / 104857600)}MB` + `File must be less than ${Math.floor(SIZE_LIMIT / 1048576)}MB` ) }