It’s hard to tell if the code samples you’ve provided are complete or boiled down examples, but I’m fairly sure that the LiveView upload features are expected to be used from within a form element.
Have you tried putting the live_file_input inside of a form? If not, I think that would be a good place to start.
Another thing that has caused me issues with live uploads is not having a phx-change handler on the form. Even if that handler does nothing but respond {:noreply, socket} it’s still needed for live uploads.
I’d recommend reading through the official documentation if you haven’t, it should cover everything you need and is likely more up-to-date than the videos you’ve mentioned.


















