This commit is contained in:
2026-05-09 13:41:07 -03:00
parent ff3db71084
commit 7b5d4afd07
4 changed files with 8 additions and 8 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
const PAGE_SIZE = 12;
const MAX_FILE_BYTES = 5 * 1024 * 1024;
const MAX_IMAGE_PIXELS = 20_000_000;
const VIEW_DWELL_MS = 1000;
const VIEW_THRESHOLD = 0.9;
const VIEW_DEDUPE_MS = 24 * 60 * 60 * 1000;
@@ -193,7 +194,8 @@ async function validateClientFile(file) {
try {
const dimensions = await readImageDimensions(file);
if (dimensions.width > 6000 || dimensions.height > 6000) return 'IMAGE EXCEEDS 6000x6000.';
if (dimensions.width > 6000 || dimensions.height > 6000) return 'IMAGE EDGE EXCEEDS 6000PX.';
if (dimensions.width * dimensions.height > MAX_IMAGE_PIXELS) return 'IMAGE EXCEEDS 20MP.';
} catch {
return 'IMAGE COULD NOT BE INSPECTED.';
}