Greetings to everyone. I hope you all are having a wonderful day/night.
I am working on a live view app and have a requirement where the user can upload only one video OR can upload up to 5 photos. I have the live view as follows
For your use case I would recommend making two upload configs with the desired settings- for example one named video and one named images, and then disabling one when the other is in use. You will need to render two live_file_input elements but it should be much simpler to validate your constraints this way.
If you must use a single input, then you will need to set max_entries to 5 and then use the low-level uploaded_entries/2 function to manage the entries and validate your specific conditions, like cancelling entries when a video is selected.