Frontend system design · about 40 minutes
Large media upload
Design the upload feature of a media product. Users upload images and videos, and one video can be several gigabytes. The user selects or drops several files, sees progress for each one, and can cancel. An upload must survive a short network loss. A large upload should continue after a page reload and not start again from zero. Many users are on mobile networks. After the upload, the server processes the file, for example to make thumbnails.
Ask first
- What are the limits: file size, file types, and number of files at one time?
- Do files go through our server, or directly to object storage with signed URLs?
- Must an upload resume after a page reload, or only after a network drop?
- Do we change files on the client, for example resize images or make a preview?
- What happens after the upload: processing, a virus scan? How long does it take?
- May the user move to another page of the app while uploads run?
The outline
Write your own outline for each part first.
The strong answer, the pitfalls and the follow-ups opens with a year in the app. What a year includes