On server restart LiveView file upload form is not recovering auto

Hi everyone,
I am using LiveView file uploading which is working awesome. but when I deploy my server if someone uploading files, it stop uploading. So i am trying to use phx-auto-recover. When i restart server it try to recover last state of form. But due to different file upload reference facing this error.

Here is my code:

  @upload_options [
    accept: ~w(.jpg .jpeg .png image/jpeg image/png),
    max_entries: 5,
    max_file_size: 4857600,
    auto_upload: true

  def mount(_params, _session, socket) do
     |> assign(:uploaded_files, [])
     |> allow_upload(:photo, @upload_options)

  @impl true
  def handle_event("recover_upload", params, socket) do
    IO.inspect params

    {:noreply, socket}

  @impl true
  def handle_event("upload", _params, socket) do
    |> process_photos()

    {:noreply, socket}

I am expecting it should execute recover_upload but it is not. it is throwing error before reaching to this function.

<form id="form" phx-submit="save" phx-change="upload" phx-auto-recover="recover_upload">
   <div class="file_upload">
      <%= live_file_input @uploads.photo %>

Thanks in Advance :smiley: