From c96ec9e51e80a1fbeaa0459da0bb8d92269c2119 Mon Sep 17 00:00:00 2001 From: Seok93 Date: Fri, 27 Sep 2024 23:05:12 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20#115=20=EC=9D=BC=EC=A0=95=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20accept=20=EC=84=A4=EC=A0=95=20=EC=83=81=EC=88=98?= =?UTF-8?q?=EB=A1=9C=20=EC=B6=94=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/task/ModalTaskForm.tsx | 2 +- src/components/modal/task/UpdateModalTask.tsx | 2 +- src/constants/settings.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/modal/task/ModalTaskForm.tsx b/src/components/modal/task/ModalTaskForm.tsx index c032d9fd..0fe5b249 100644 --- a/src/components/modal/task/ModalTaskForm.tsx +++ b/src/components/modal/task/ModalTaskForm.tsx @@ -219,7 +219,7 @@ export default function ModalTaskForm({ formId, project, taskId, onSubmit }: Mod id="files" label="첨부파일" files={files} - accept=".jpg, .jpeg, .png, .svg, .webp, .pdf, .txt, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .hwp, .zip, .rar, .7z, .alz, .egg" + accept={TASK_SETTINGS.FILE_ACCEPT} onFileChange={handleFileChange} onFileDrop={handleFileDrop} onFileDeleteClick={handleFileDeleteClick} diff --git a/src/components/modal/task/UpdateModalTask.tsx b/src/components/modal/task/UpdateModalTask.tsx index c13d52a4..746d56f4 100644 --- a/src/components/modal/task/UpdateModalTask.tsx +++ b/src/components/modal/task/UpdateModalTask.tsx @@ -193,7 +193,7 @@ export default function UpdateModalTask({ project, taskId, onClose: handleClose id="files" label="첨부파일" files={taskFileList} - accept=".jpg, .jpeg, .png, .svg, .webp, .pdf, .txt, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .hwp, .zip, .rar, .7z, .alz, .egg" + accept={TASK_SETTINGS.FILE_ACCEPT} onFileChange={handleFileChange} onFileDrop={handleFileDrop} onFileDeleteClick={handleFileDeleteClick} diff --git a/src/constants/settings.ts b/src/constants/settings.ts index ff5864b0..d8518613 100644 --- a/src/constants/settings.ts +++ b/src/constants/settings.ts @@ -19,8 +19,10 @@ export const USER_SETTINGS = Object.freeze({ MAX_EMAIL_LENGTH: 128, }); +// prettier-ignore export const TASK_SETTINGS = Object.freeze({ MAX_FILE_SIZE: 2 * MB, MAX_FILE_COUNT: 10, + FILE_ACCEPT: '.jpg, .jpeg, .png, .svg, .webp, .pdf, .txt, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .hwp, .zip, .rar, .7z, .alz, .egg', FILE_TYPES: TASK_ACCEPT_FILE_TYPES, });