feat: add multipart image uploads

Register Fastify multipart support, validate JPEG/PNG/WebP binary signatures, store upload bytes through ImageStorage, persist metadata after storage succeeds, clean up bytes on metadata failure, and document the upload boundary. Verification: npm test passed 68 tests and integration passed 14 tests. No build script is configured.
This commit is contained in:
2026-09-08 17:38:27 -04:00
parent 5a041c8a5c
commit f7152bcff3
14 changed files with 278 additions and 11 deletions
+3 -2
View File
@@ -55,8 +55,9 @@ Validate:
The metadata service currently enforces JPEG, PNG, and WebP MIME types, a
10 MiB default file-size limit, and a 10,000-pixel maximum width and height.
Binary signature checks and multipart upload validation remain part of the
upload transport slice.
Multipart upload validation now checks the declared MIME type against JPEG,
PNG, and WebP signatures before storage. Image dimensions are supplied by the
upload transport until a decoder-backed dimension extractor is added.
Generate:
- thumbnail