Okay, so maybe I am a little tired, but I can’t figure this out right now. The solution probably is simple
Is there any way to show the errors retrieved from
upload_errors/2 when using LiveView Uploads in a flash message?
The link I am missing right now is, where can I call
put_flash when an upload got errors?
Nevermind. The obvious solution is to extract the errors in the validation event and call
def handle_event("validate_upload", params, socket) do
for entry <- socket.assigns.uploads.editor_images.entries,
err <- upload_errors(socket.assigns.uploads.editor_images, entry),
socket = put_flash(socket, :error, Enum.join(errors, ", "))