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` ) }