From 2f1e090a0743eacc029cb49beafe92269388e142 Mon Sep 17 00:00:00 2001 From: kimbokon Date: Sun, 4 Jan 2026 19:52:49 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=9A=A9=EB=9F=89=20=EC=A0=9C=ED=95=9C=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20413=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=ED=95=B8=EB=93=A4=EB=A7=81=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- salesmanagement/index.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/salesmanagement/index.php b/salesmanagement/index.php index 00fe833..6e79d58 100644 --- a/salesmanagement/index.php +++ b/salesmanagement/index.php @@ -2428,6 +2428,16 @@ const selectedFiles = Array.from(e.target.files); if (selectedFiles.length === 0) return; + // 클라이언트 사이드 용량 체크 (기본 20MB) + const MAX_SIZE = 20 * 1024 * 1024; + for (const file of selectedFiles) { + if (file.size > MAX_SIZE) { + alert(`파일 '${file.name}'의 용량이 너무 큽니다. (최대 20MB)`); + e.target.value = ''; + return; + } + } + setUploading(true); const formData = new FormData(); formData.append('tenant_id', tenantId); @@ -2441,6 +2451,11 @@ method: 'POST', body: formData }); + + if (response.status === 413) { + throw new Error('파일 용량이 서버 허용 범위를 초과했습니다. (413 Content Too Large)'); + } + const result = await response.json(); if (result.success) loadFiles(); else alert('업로드 실패: ' + result.error);