From 0ebf8eaf845ca32b9d987c9089cfe2da2eb21eee Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 3 Oct 2026 20:57:18 +0000 Subject: [PATCH 1/4] Add client-side maximum target size validation Adds max="5368709120" (5 GiB) to the target_bytes and batch_target_bytes inputs and implements client-side validation logic to check if the input value exceeds the maximum allowed size, displaying an error using aria live regions without a round trip to the server. --- saas_web.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/saas_web.py b/saas_web.py index 63265e94..e1494c2a 100644 --- a/saas_web.py +++ b/saas_web.py @@ -178,7 +178,7 @@ async def add_security_headers(request: Request, call_next):


- +
Maximum allowed file size in bytes (e.g., 2000000000 for ~1.86 GiB)
1.86 GiB

@@ -268,6 +268,12 @@ async def add_security_headers(request: Request, call_next): preview.style.color = '#dc3545'; this.setCustomValidity('Must be greater than 0.'); this.setAttribute('aria-invalid', 'true'); + } else if (val > MAX_UPLOAD_BYTES) { + const limitText = formatBinaryBytes(MAX_UPLOAD_BYTES); + preview.innerText = 'Exceeds maximum allowed size of ' + limitText + '.'; + preview.style.color = '#dc3545'; + this.setCustomValidity('Exceeds maximum allowed size.'); + this.setAttribute('aria-invalid', 'true'); } else { preview.innerText = formatBinaryBytes(val); } @@ -302,6 +308,12 @@ async def add_security_headers(request: Request, call_next): preview.style.color = '#dc3545'; this.setCustomValidity('Must be greater than 0.'); this.setAttribute('aria-invalid', 'true'); + } else if (val > MAX_UPLOAD_BYTES) { + const limitText = formatBinaryBytes(MAX_UPLOAD_BYTES); + preview.innerText = 'Exceeds maximum allowed size of ' + limitText + '.'; + preview.style.color = '#dc3545'; + this.setCustomValidity('Exceeds maximum allowed size.'); + this.setAttribute('aria-invalid', 'true'); } else { preview.innerText = formatBinaryBytes(val); } @@ -416,7 +428,7 @@ async def add_security_headers(request: Request, call_next):


- +
Maximum allowed size in bytes for each output file
1.86 GiB

From 5b5f333afc69bd7efe26042c303d6c8efa33daa7 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:00:15 +0000 Subject: [PATCH 2/4] Add client-side maximum target size validation Adds max="5368709120" (5 GiB) to the target_bytes and batch_target_bytes inputs and implements client-side validation logic to check if the input value exceeds the maximum allowed size, displaying an error using aria live regions without a round trip to the server. From 825cf9a76540c25e1064ce2841c912aa50c55fcb Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:03:01 +0000 Subject: [PATCH 3/4] Add client-side maximum target size validation Adds max="5368709120" (5 GiB) to the target_bytes and batch_target_bytes inputs and implements client-side validation logic to check if the input value exceeds the maximum allowed size, displaying an error using aria live regions without a round trip to the server. From 379e1daf88e8686db310071f85e40c93d85eb231 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:05:45 +0000 Subject: [PATCH 4/4] Add client-side maximum target size validation Adds max="5368709120" (5 GiB) to the target_bytes and batch_target_bytes inputs and implements client-side validation logic to check if the input value exceeds the maximum allowed size, displaying an error using aria live regions without a round trip to the server.