diff --git a/lib/livebook_web/live/session_live/cell_upload_component.ex b/lib/livebook_web/live/session_live/cell_upload_component.ex index 320b32a8f..55a00d969 100644 --- a/lib/livebook_web/live/session_live/cell_upload_component.ex +++ b/lib/livebook_web/live/session_live/cell_upload_component.ex @@ -56,7 +56,7 @@ defmodule LivebookWeb.SessionLive.CellUploadComponent do <%= live_patch "Cancel", to: @return_to, class: "button-base button-outlined-gray" %> @@ -79,7 +79,7 @@ defmodule LivebookWeb.SessionLive.CellUploadComponent do path = Path.expand(path) upload_file = FileSystem.File.local(path) ext = Path.extname(entry.client_name) - filename = name <> ext + filename = if name == "", do: entry.client_name, else: name <> ext destination_file = FileSystem.File.resolve(images_dir, filename) result =