From 299906a5a5aeae398e2ec72e55b40ba5ddceb724 Mon Sep 17 00:00:00 2001 From: beerpsi <92439990+beer-psi@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:50:13 +0700 Subject: [PATCH] client: increase import file size limit to 8MB (#1254) * client: increase import file size limit to 8MB * fix: if >8e6 is invalid, then valid should be <=8e6 --- client/src/components/imports/ImportFileInfo.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/imports/ImportFileInfo.tsx b/client/src/components/imports/ImportFileInfo.tsx index f1d977c2e..be40e424e 100644 --- a/client/src/components/imports/ImportFileInfo.tsx +++ b/client/src/components/imports/ImportFileInfo.tsx @@ -35,7 +35,7 @@ export default function ImportFileInfo({ const [errMsg, setErrMsg] = useState(""); const [data, setData] = useState(null); - const valid = useMemo(() => errMsg === null && file && file.size < 4e6, [errMsg]); + const valid = useMemo(() => errMsg === null && file && file.size <= 8e6, [errMsg]); const [moreInfo, setMoreInfo] = useState>({}); const [moreInfoFulfilled, setMoreInfoFulfilled] = useState(!MoreDataForm); @@ -67,7 +67,7 @@ export default function ImportFileInfo({ return null; } - const isTooLarge = file.size > 4e6; + const isTooLarge = file.size > 8e6; if (!data || !file) { return null; @@ -87,7 +87,7 @@ export default function ImportFileInfo({ {prettyBytes(file.size)} {isTooLarge - ? " (File too large, Can't be larger than 4MB. Sorry!)" + ? " (File too large, Can't be larger than 8MB. Sorry!)" : ""}