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:
+3
-1
@@ -98,7 +98,9 @@ available listings.
|
||||
|
||||
`POST /api/v1/admin/inventory/:id/images` stores validated image metadata for an
|
||||
owned physical inventory item. File bytes are handled by the future
|
||||
`ImageStorage` adapter; publication counts persisted inventory images rather
|
||||
`ImageStorage` adapter; JSON metadata and multipart image uploads are accepted.
|
||||
Multipart uploads require `width` and `height` fields and validate the binary
|
||||
signature before storage. Publication counts persisted inventory images rather
|
||||
than trusting a listing request field.
|
||||
|
||||
## Provider matching
|
||||
|
||||
Reference in New Issue
Block a user