{% if mode == 'edit' %}
{# INSERT IN TEXT in edit mode for images #}
{% if ext matches '/(jpg|jpeg|png|gif|svg)$/i' %}
{% endif %}
{# INSERT IN TEXT in edit mode for videos #}
{% if ext matches '/(mkv|mp4|ogv|webm)$/i' %}
{% endif %}
{# INSERT IN TEXT in edit mode for audio #}
{% if ext matches '/(aac|flac|mp3|ogg|opus|wav)$/i' %}
{% endif %}
{# INSERT IN TEXT in edit mode for plain text #}
{% if ext matches '/txt$/i' %}
{% endif %}
{% endif %}
{# Edit filename (available in view mode too) #}
{% if not upload.immutable and not Entity.isReadOnly and App.Users.userData.uploads_layout != 0 %}
{% endif %}
{% if mode == 'edit' %}
{# Annotate image #}
{% if ext matches '/(jpg|jpeg|png|gif)$/i' %}
{% endif %}
{# LOAD IN JSON EDITOR #}
{% if ext matches '/(json)$/i' %}
{% endif %}
{# Save mol file as png #}
{% if ext matches '/(mol)$/i' %}
{% endif %}
{# Upload a new version: only in edit mode because currently it'll look into the editor to change the image, but it might be convenient to also have it in view mode #}
{% if not upload.immutable %}
{% endif %}
{% endif %}
{# Show content of plain text #}
{% if ext matches '/(txt|md|json)$/i' %}
{% endif %}
{# Load in NMRium #}
{% if ext matches '/jdx$/i' %}
{% endif %}
{# More info #}
{% if App.Users.userData.uploads_layout != 0 %}
{% endif %}
{% if not upload.immutable and not Entity.isReadOnly %}
{# ARCHIVE #}
{# DESTROY #}
{% endif %}