From f6a5ca301178d6159d862c7718f77cedd54f0d33 Mon Sep 17 00:00:00 2001 From: Nastya Date: Sat, 17 Feb 2024 03:14:28 +0300 Subject: [PATCH] -- --- .../ViewPublicationPage/StartPageViewPublication.tsx | 4 ++++ lib/components/ViewPublicationPage/questions/File.tsx | 2 ++ lib/components/ViewPublicationPage/tools/fileUpload.ts | 2 +- src/App.tsx | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/components/ViewPublicationPage/StartPageViewPublication.tsx b/lib/components/ViewPublicationPage/StartPageViewPublication.tsx index a638cbf..a5ee5a5 100644 --- a/lib/components/ViewPublicationPage/StartPageViewPublication.tsx +++ b/lib/components/ViewPublicationPage/StartPageViewPublication.tsx @@ -344,6 +344,7 @@ function QuizPreviewLayoutByType({ ) : ( { const uploadFile = async (file: File | undefined) => { if (isSending) return; if (!file) return; + console.log(file.size) + console.log(MAX_FILE_SIZE) if (file.size > MAX_FILE_SIZE) return setModalWarningType("errorSize"); const isFileTypeAccepted = ACCEPT_SEND_FILE_TYPES_MAP[currentQuestion.content.type].some( diff --git a/lib/components/ViewPublicationPage/tools/fileUpload.ts b/lib/components/ViewPublicationPage/tools/fileUpload.ts index 641b57c..972eda4 100644 --- a/lib/components/ViewPublicationPage/tools/fileUpload.ts +++ b/lib/components/ViewPublicationPage/tools/fileUpload.ts @@ -1,7 +1,7 @@ import { UploadFileType } from "@model/questionTypes/file"; -export const MAX_FILE_SIZE = 5 * 2 ** 20; +export const MAX_FILE_SIZE = 419430400; export const UPLOAD_FILE_DESCRIPTIONS_MAP = { picture: { diff --git a/src/App.tsx b/src/App.tsx index ec0278a..7c5cf40 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,7 +7,7 @@ import QuizAnswerer from "../lib/components/QuizAnswerer"; import { ApologyPage } from "../lib/components/ViewPublicationPage/ApologyPage"; // const defaultQuizId = "45ef7f9c-784d-4e58-badb-f6b337f08ba0"; // branching -const defaultQuizId = "d354ba89-0bd3-4d5e-a8ce-88d6f387f3fc"; //looooong header +const defaultQuizId = "cde381db-8ccb-402c-b55f-2c814be9bf25"; //looooong header // const defaultQuizId = "ad7f5a87-b833-4f5b-854e-453706ed655c"; // linear export default function App() {