added embedded images at pasta view

This commit is contained in:
Schrottkatze 2023-02-27 00:47:40 +01:00
parent 51751e3ee2
commit 1ebbe5d922
3 changed files with 14 additions and 0 deletions

View file

@ -32,6 +32,10 @@
{% if pasta.file.is_some() %}
<br>
<br>
{% if pasta.file.as_ref().unwrap().is_image() %}
<img src="{{ args.public_path }}/file/{{pasta.id_as_animals()}}/{{pasta.file.as_ref().unwrap().name()}}" alt="">
<br>
{%- endif %}
<a href="{{ args.public_path }}/file/{{pasta.id_as_animals()}}/{{pasta.file.as_ref().unwrap().name()}}" download>
Download attached file: '{{pasta.file.as_ref().unwrap().name()}}' [{{pasta.file.as_ref().unwrap().size}}]
</a>