File upload not act the same with images

I am using file_upload with progress function and auto_upload: true
at the end of the progress function I have this

defp handle_progress(:attach_file, entry, socket) do
    if entry.done? do
        {:noreply, assign(socket, file_name: file_name)}
       {:noreply, socket}

In the leex file I have this

<%= @file_name %>

The problem is that when I am uploading image file the file_name display for short period of time and disapear
But When I am uploading non-image file like a pdf the file_name remains

Why image files act differently, and how to solve that

Solved: need to add [^upload] to the live_reload at config/dev

1 Like