aboutsummaryrefslogtreecommitdiff
path: root/lib/waev_web/templates/exports
diff options
context:
space:
mode:
authorGuillermo Ramos2020-02-06 12:57:02 +0100
committerGuillermo Ramos2020-02-06 13:37:46 +0100
commitf7819d6b85444b0035c978ce775f0acf72363c17 (patch)
treec52f52a74740cb724a62a09a743bc515d8611c18 /lib/waev_web/templates/exports
parent20dce72da7222fa636d4306bf1c6f1b478194a3d (diff)
downloadwaev-f7819d6b85444b0035c978ce775f0acf72363c17.tar.gz
Display images
Diffstat (limited to 'lib/waev_web/templates/exports')
-rw-r--r--lib/waev_web/templates/exports/show.html.eex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/waev_web/templates/exports/show.html.eex b/lib/waev_web/templates/exports/show.html.eex
index 77727a8..0ecf87b 100644
--- a/lib/waev_web/templates/exports/show.html.eex
+++ b/lib/waev_web/templates/exports/show.html.eex
@@ -26,6 +26,9 @@ ID: <%= @id %>
<% else %>
<i><%= filename %></i> (fichero adjunto no disponible)
<% end %>
+ <% %Waev.Export.Message.Photo{filename: filename, mime: mime, blob: blob} -> %>
+ <div><img alt="<%= filename %>" src="data:<%= mime %>;base64,<%= blob %>" /></div>
+ <div><a href="<%= Routes.exports_path(@conn, :get_attachment, @id, filename) %>"><%= filename %></a></div>
<% nil -> %>
<% end %>
<%= message.text %>