Live file input with associated annotations per file to be uploaded!

Hello Fellas,

I have been using


The way it was explained by @chrismccord in this Phoenix LiveView Uploads Deep Dive - YouTube
I uploading the images to s3 bucket.

Everything works fine but I got a new recuirment that the field holding the urls of the images is a map in order to be able to have something like

%TheStruct{image_urls: %{medium: "some_url", mobile_phone: "some other url"}}

So what this means is I need a file input that’s strictly associated with a particular image to be uploaded.

How would you aproach that issue ?
Could having a different struct just to hold image infmartions be the best possible option (creating a seperate live component just to faciltate the images structs )?

I would suggest separating the step of uploading/persisting images and maintaining metadata for those images. If images are not meant to be consumed before metadata is provided you could store them with a flag of some kind, so you know when images were uploaded, but not yet provided with metadata.