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.';
}
+4 -2
View File
@@ -86,9 +86,11 @@
</label>
<div class="upload-rules">
<span>MAX_SIZE: 5MB</span>
<span>REQUIRED_RATIO: 1:1 SQUARE</span>
<span>RATIO: ANY</span>
<span>OUTPUT_FORMAT: WEBP</span>
<span>MAX_DIMENSIONS: 6000x6000</span>
<span>MAX_INPUT_EDGE: 6000PX</span>
<span>MAX_PIXELS: 20MP</span>
<span>OUTPUT_MAX_EDGE: 1600PX</span>
</div>
<div class="modal-actions">
<button class="secondary-action" id="cancel-upload" type="button">CANCEL</button>