diff options
author | Guillermo Ramos | 2020-02-06 12:57:02 +0100 |
---|---|---|
committer | Guillermo Ramos | 2020-02-06 13:37:46 +0100 |
commit | f7819d6b85444b0035c978ce775f0acf72363c17 (patch) | |
tree | c52f52a74740cb724a62a09a743bc515d8611c18 /lib/waev_web/templates/exports | |
parent | 20dce72da7222fa636d4306bf1c6f1b478194a3d (diff) | |
download | waev-f7819d6b85444b0035c978ce775f0acf72363c17.tar.gz |
Display images
Diffstat (limited to 'lib/waev_web/templates/exports')
-rw-r--r-- | lib/waev_web/templates/exports/show.html.eex | 3 |
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 %> |