Back
System Design

Design a File Upload UI

ModeInterview answer templates and key talking points
System Design
Design a News Feed UIDesign a Component Library / Design SystemDesign a File Upload UIDesign an E-commerce Cart + Product PageDesign an Autocomplete / Search UIDesign a Video Player (YouTube / Netflix)Design a Data Table (Sort / Filter / Virtualize)Design an Image Carousel / Photo GalleryDesign a Real-time Chat UIDesign a Collaborative Editor (Google Docs)
mediumdata_state

Design a File Upload UI

Interview Prep mode active

Interview answer templates and key talking points. Switch the mode in the header to change your experience.

Step 1 — Constraints: 1GB max file, resume on network failure, 3G networks, progress tracking

Step 2 — Decision: Single upload (simple, no resume) vs chunked (10MB chunks, resume-able)

Step 3 — Code: Parallel chunk upload (3–5 at a time), IndexedDB tracking, SHA256 hash

Step 4 — Gotchas: No resume = restart 1GB from 0%, sequential chunks = slow, no hash = corrupted file

Step 5 — Anti-patterns: Single large request, no parallelization, dynamic chunk size micro-optimization

Step 6 — Interview (30min): Max size → Chunking strategy → Resume mechanism → Retry logic

Step 7 — Simulation: "1GB upload on 3G" → 10MB chunks + parallel + IndexedDB + hash

Step 8 — Tiered: Junior (single upload), Mid (chunked), Senior (resume+hash+exponential backoff)

Step 9 — Checklist: 10MB chunks, upload 3–5 parallel, IndexedDB resume tracking, SHA256 per chunk, exponential backoff

Say This in Your Interview
"Chunk 1GB into 10MB pieces, upload 3–5 in parallel. Track completed chunks in IndexedDB for resume capability. Each chunk gets SHA256 hash for integrity check. Retry failed chunks with exponential backoff (1s, 2s, 4s, max 30s). Show progress = (completed/total)*100 with ETA based on average speed."
Next

Interview Prep

Interview answer templates and key talking points

On this page