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