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, });