{%- macro render_annotation_fields(data, parent_key='') -%} {%- for key, value in data.items() -%} {%- set current_key = parent_key ~ key if parent_key else key -%} {%- if value is mapping -%}

{{ current_key }}

{{ render_annotation_fields(value, parent_key=current_key ~ ' -> ') }}
{%- elif value is iterable and value is not string -%}

{{ current_key }}

{%- for item in value -%} {%- if item is mapping -%} {{ render_annotation_fields(item, parent_key=current_key ~ ' (' ~ loop.index ~ ') -> ') }} {%- else -%}
{{ item }}
{%- endif -%} {% if not loop.last %}
{% endif %} {%- endfor -%}
{%- else -%}
{{ current_key }} {{ value }}
{%- endif -%} {%- endfor -%} {%- endmacro -%} {%- macro render_hash(label, value, tooltip, link=None) -%} {%- if value -%}
{% if link %}{{ label }}{% else %}{{ label }}{% endif %}
{{ value }}
{%- endif -%} {%- endmacro -%}
File Information Raw JSON
Name
{{ file['annotations']['file/base']['record']['name'] }}
Extension
{{ file['annotations']['file/base']['record']['extension'] or 'None' }}
Record ID
{{ local_filesystem_info['record_id'] }}
Size
{{ file_size['human'] }}
Media Type
{{ file['annotations']['file/base']['record']['media_type'] }}
Date Modified (Local)
{{ local_filesystem_info['date_modified']['human'] }}
Date Created (Local)
{{ local_filesystem_info['date_created']['human'] }}

Content Hashes

{% set hashes = file.get('annotations', {}).get('file/base', {}).get('record', {}).get('all_hash_ids', {}) %} {% set sha256_val = file.get('hash') or hashes.get('SHA-256') %} {% set blake3_val = hashes.get('BLAKE3') %} {% set md5_val = hashes.get('MD5') %} {% set sha1_val = hashes.get('SHA-1') %} {% set dorsal_val = file.get('validation_hash') or hashes.get('DORSAL') %} {% set tlsh_val = file.get('similarity_hash') or hashes.get('TLSH') %} {% set quick_val = file.get('quick_hash') or hashes.get('QUICK') %} {% if not sha256_val and not dorsal_val and not quick_val %}
No hashes calculated
{% else %} {{ render_hash('SHA-256', sha256_val, 'Cryptographic hash for verifying file integrity.', 'https://en.wikipedia.org/wiki/SHA-2') }} {{ render_hash('BLAKE3', blake3_val, 'A modern, high-speed cryptographic hash.', 'https://en.wikipedia.org/wiki/BLAKE_(hash_function)') }} {{ render_hash('MD5', md5_val, 'A legacy cryptographic hash, widely used for basic checksums.', 'https://en.wikipedia.org/wiki/MD5') }} {{ render_hash('SHA-1', sha1_val, 'A legacy cryptographic hash.', 'https://en.wikipedia.org/wiki/SHA-1') }} {{ render_hash('DORSAL', dorsal_val, 'Dorsal\'s proprietary BLAKE3-based validation hash.') }} {{ render_hash('TLSH', tlsh_val, 'A locality-sensitive hash used to detect similar files.', 'https://en.wikipedia.org/wiki/Locality-sensitive_hashing') }} {{ render_hash('Quick Hash', quick_val, 'A fast, sample-based hash for quick identification.', 'http://docs.dorsalhub.com/quick') }} {% endif %}
{% if file['annotations'] and file['annotations']|length > 1 %}

Annotations

{% for key, annotation in file['annotations'].items() %} {% if annotation and key != 'file/base' %}
{{ key }} ▼
{{ render_annotation_fields(annotation['record']) }}
{% endif %} {% endfor %}
{% endif %} {% if file['tags'] %}

Tags

{% for tag in file['tags'] %} {{ tag['name'] }}: {{ tag['value'] }} {% endfor %}
{% endif %}
{{ raw_data_json }}