diff --git a/lib/beacon/live_admin/live/media_library_live/show_component.ex b/lib/beacon/live_admin/live/media_library_live/show_component.ex index f1e0ebab..5859d877 100644 --- a/lib/beacon/live_admin/live/media_library_live/show_component.ex +++ b/lib/beacon/live_admin/live/media_library_live/show_component.ex @@ -13,16 +13,18 @@ defmodule Beacon.LiveAdmin.MediaLibraryLive.ShowComponent do socket |> assign(assigns) |> assign(:is_image?, MediaLibrary.is_image?(site, asset)) - |> assign(:url, MediaLibrary.url_for(site, asset)) |> assign(:urls, urls_for(site, asset)) {:ok, socket} end defp urls_for(site, asset) do - site - |> MediaLibrary.urls_for(asset) - |> Enum.with_index() + urls = + site + |> MediaLibrary.urls_for(asset) + |> Enum.with_index(1) + + [{{"name", asset.file_name}, 0} | urls] end @impl true @@ -38,7 +40,7 @@ defmodule Beacon.LiveAdmin.MediaLibraryLive.ShowComponent do - +