Serverless Photo Intake Explained for Upload Validation and Processing Decisions
Short answer: validate the upload at the edge, persist an immutable original, and process derivative crops asynchronously unless the product cannot display an image without one. That split keeps a slow crop from blocking intake while preserving a clear retry boundary. The page usually fires later. A seller uploads a 12 MB phone photo, the listing API returns 202, and the thumbnail queue quietly…
The article explains the process of serverless photo intake for upload validation and processing decisions. It emphasizes validating the upload at the edge, persisting an immutable original, and processing derivative crops asynchronously to prevent slow crops from blocking intake. The uploader provides a 12 MB phone photo, the listing API returns 202, and the thumbnail queue quietly backs up.
A failed crop is visible, while a corrupt original is harder to repair. The article outlines a small state machine for intake, including accepted bytes becoming original-stored, a validated record becoming ready-for-processing, and each derivative having its own terminal outcome. A retry must be safe at every transition. The validation process starts with checking authenticated owner, request size, content type, and a cryptographic digest, followed by inspecting the file signature, parsing dimensions, and rejecting decompression bombs or dimensions outside product policy.
The filename is considered metadata, not evidence, and should not be used as evidence. The validator can emit a compact event containing the object version, digest, detected format, width, height, and policy result.
Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.