Code Room
Code reviewMedium
Question
Review this Python image-processing route that uses a temp file on disk.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
import tempfile, os def process_image(upload): fd, tmp = tempfile.mkstemp(suffix=".png") with os.fdopen(fd, "wb") as f: f.write(upload.read()) result = run_filter(tmp) # may raise on malformed images os.remove(tmp) return resultRun or narrate your approach, then ask the coach.