fix: block PDF uploads, fix PBM/PGM/PPM batch failures, add tests

- Added isImageFile() filter to all drop handlers (dropzone, collage,
  file-upload-area) so PDFs and non-image files are rejected on drop.
  Previously only the file picker's accept attribute filtered; drag-and-
  drop accepted anything.

- Added ppm, pgm, pbm to CLI_DECODED_FORMATS in file-validation.ts.
  These formats were missing, causing Sharp metadata checks to fail for
  some files during batch validation, which silently dropped them from
  results ("File not found in batch results").

- Added integration tests for PBM, PGM, PPM, TIFF, QOI, JP2, SVGZ
  single-file processing, plus a test confirming PDF is rejected.
This commit is contained in:
SnapOtter
2026-05-11 17:33:51 +08:00
parent a52a3b7e87
commit 50d1f532d1
5 changed files with 119 additions and 3 deletions
+3
View File
@@ -172,6 +172,9 @@ const CLI_DECODED_FORMATS = new Set([
"cur",
"dpx",
"fits",
"ppm",
"pgm",
"pbm",
]);
/**