In this episode, we dive into how to initially create a record in the database for each file upload before the actual file data is sent. The goal here is to support more dynamic features like updating file info (such as title or description) while uploads are still processing.
Instead of relying on typical Inertia.js form submissions, we switch to using Axios for a bit more flexibility. We build an endpoint that allows us to create a video record (or whatever model you're working with), get its unique ID, and immediately push it into your app's UI so that you can display progress or let users modify details mid-upload.
Throughout the video, we:
We also add some basic validation, like making sure a title is always provided. By the end, you'll have a setup where you can create and track uploads more robustly, opening the door to showing progress, inline editing, and more sophisticated UI interactions during uploads.