From d59e2cf4b9b6e93d2a315e11de2cc87168dad5d3 Mon Sep 17 00:00:00 2001 From: "Caleb J. Acosta" Date: Thu, 11 Aug 2022 02:20:19 -0500 Subject: [PATCH] Add SVG as acceptable file type in markdown (#1341) --- lib/livebook_web/live/session_live.ex | 2 +- lib/livebook_web/live/session_live/cell_upload_component.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/livebook_web/live/session_live.ex b/lib/livebook_web/live/session_live.ex index 99413d2d8..ff4203fad 100644 --- a/lib/livebook_web/live/session_live.ex +++ b/lib/livebook_web/live/session_live.ex @@ -61,7 +61,7 @@ defmodule LivebookWeb.SessionLive do |> prune_outputs() |> prune_cell_sources() |> allow_upload(:cell_image, - accept: ~w(.jpg .jpeg .png .gif), + accept: ~w(.jpg .jpeg .png .gif .svg), max_entries: 1, max_file_size: 5_000_000 )} 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 9e7466ae7..46692c1ac 100644 --- a/lib/livebook_web/live/session_live/cell_upload_component.ex +++ b/lib/livebook_web/live/session_live/cell_upload_component.ex @@ -17,7 +17,7 @@ defmodule LivebookWeb.SessionLive.CellUploadComponent do <%= if @uploads.cell_image.errors != [] do %>
- Invalid image file. The image must be either GIF, JPEG, or PNG and cannot exceed 5MB in size. + Invalid image file. The image must be either GIF, JPEG, SVG or PNG and cannot exceed 5MB in size.
<% end %> <%= if @error_message do %>