Ozzy47
Well-known member
In my addon I have this.
But for some reason I can't get the hash to show. I've tried
HTML:
<xf:if is="count($resource.CurrentVersion.Attachments) == 1">
<xf:set var="$attachment" value="{{ $resource.CurrentVersion.Attachments|first }}" />
<dl class="pairs pairs--justified">
<dt>{{ phrase('extensionsize_extention_type') }}</dt>
<dd>{{ $attachment.getExtension() }}</dd>
</dl>
<dl class="pairs pairs--justified">
<dt>{{ phrase('extensionsize_file_size') }}</dt>
<dd>{{ $attachment.getFileSize()|file_size }}</dd>
</dl>
<dl class="pairs pairs--justified">
<dt>Hash</dt>
<dd>{{ $attachment.getFileHash() }}</dd>
</dl>
</xf:if>
But for some reason I can't get the hash to show. I've tried
$attachment.getFileHash()
$attachment.getFileHash()|file_hash
$attachment.file_hash