In this episode, we're focusing on the client-side experience for file uploads—specifically, how to show upload progress so users know what's happening while their files are being sent to the server. Before we move on to handling chunk assembly on the server, we want to make the upload progress super clear and visually appealing for users.
We start by adding some new flags and properties to each upload: uploading
(to track if the file is actively uploading) and uploadProgress
(to show how far along the upload is). We hardcode this progress value at first so we can build a nice progress bar UI in our upload item list. This includes a visual bar that grows as the progress updates—a simple but effective touch for user feedback!
Once the progress bar looks good, we connect it to real data by hooking into upload events. As the upload proceeds, we update the progress value and see the progress bar animate in real time. We also tidy things up: when the upload completes, we hide the progress UI by flipping the uploading flag.
By the end of this video, you’ll have a working file upload progress indicator in the frontend. Next up, we'll dive into how to actually piece together those uploaded chunks on the backend and save the completed file!