{% if uploadsArr %}

{% trans %}Attached file {% plural uploadsArr|length %} Attached files {% endtrans %}

{% for upload in uploadsArr %} {% set ext = upload.real_name|getExt %}
{% if mode == 'edit' %} {% endif %} {% if ext matches '/(jpg|jpeg|png|gif|tif|tiff|pdf|eps|svg|heic)$/i' %} {# don't make the thumbnail clickable if it's a tif #} {% if ext matches '/(jpg|jpeg|png|gif|pdf|eps|svg|heic)$/i' %} {% endif %} {% elseif ext == 'mol' and App.Users.userData.chem_editor %}
{% elseif ext in constant('Elabftw\\Elabftw\\Extensions::MOLECULE') %}
{% elseif ext in constant('Elabftw\\Elabftw\\Extensions::DNA') %}
{% elseif App.Users.userData.uploads_layout %} {% endif %}

{{ upload.real_name }} {% if upload.filesize %} {{ upload.filesize|formatBytes }} - {% endif %} {{ upload.created_at }}


{# if we are in view mode, we don't show the comment if it's the default text. This is to avoid showing 'Click to add a comment' where in fact you can't click to add a comment because you are in view mode #} {% if mode == 'edit' or upload.comment != 'Click to add a comment' %}

{{ upload.comment|raw }}


{% endif %} {% if ext matches '/(json)$/i' %}

{{ 'Load into JSON Editor'|trans }}

{% endif %}

{{ 'Storage:'|trans }} {% if upload.storage == '1' %} {{ 'Local filesystem'|trans }} {% endif %} {% if upload.storage == '2' %} S3 bucket {% endif %}


{{ upload.hash_algorithm }}: {{ upload.hash }}

{% if mode == 'edit' %} {% endif %}
{% endfor %}
{% endif %}