Code RoomImage thumbnail resizer
MediumPrep Room Coding #4272

Image thumbnail resizer

Vibe & agenticAlgorithms & data structuresMid–Senior~22 min

Greenfield Python (FastAPI) service with an AI agent: users upload images and the service generates resized thumbnails (multiple sizes) and stores them in object storage. Describe the build plan: the processing library and where processing runs, input validation, resource limits, and acceptance criteria. What does a careless 'resize uploaded images to thumbnails' prompt get wrong with untrusted user uploads?

Implement
validate_upload(magic_hex: str, declared_type: str, byte_size: int, width: int, height: int) → str
Examples
in["89504e470d0a1a0a1a0a","image/png",250000,800,600]out"accept"
in["3c73766720786d6c6e73","image/png",4096,100,100]out"reject_unknown_format"
in["ffd8ffe000104a4649","image/jpeg",1200000,50000,50000]out"reject_pixel_bomb"
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 22 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.