{# Copyright 2020 Karlsruhe Institute of Technology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #} {% extends "records/manage_file_base.html" %} {% set can_update_record = has_permission(current_user, "update", "record", record.id) %} {% if file.has_md5_checksum %} {% set checksum_tooltip = _( "This checksum can be used to verify the integrity of this file and is an MD5 hash of its content." ) %} {% else %} {% set checksum_tooltip = _( "This checksum can be used to verify the integrity of this file and is created in multiple steps. First, MD5 hashes" " are calculated of all individual chunk contents used when uploading this file (with a chunk size of" " %(size)s). These hashes are concatenated (in chunk index order) and an MD5 hash of the result is calculated." " Finally, a dash and the amount of chunks are appended.", size=const.UPLOAD_CHUNK_SIZE | filesize, ) %} {% endif %} {% block content %} {% snippet "records/snippets/back_to_record.html", record=record, tab="files" %} {% if prev_file or next_file %}
{% endif %}

{{ template_hook("kadi_get_resource_overview_templates", resource=file) }}
{{ file.name }} {{ file.mimetype | truncate(50) }}

{{ file.size | filesize }}

{% trans %}Persistent ID{% endtrans %}: {{ file.id }}
{% trans %}Storage type{% endtrans %}: {{ file.storage.storage_name }}
{% if file.checksum %}
{{ file.checksum }}
{% endif %}

{% if file.description %} {% else %} {% trans %}No description.{% endtrans %} {% endif %}

{% snippet "snippets/resources/creation_info.html", resource=file %}
{{ template_hook("kadi_get_preview_templates", file=file) }}
{% trans %}Note that preview data may be truncated.{% endtrans %}
{% trans %}No preview available.{% endtrans %}
{% endblock %} {% block scripts %} {{ render_js("app/records/view-file.js") }} {% endblock %}