TYPO3 Fluid: Print size of a FAL file
„files“ is the ObjectStorage object.
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:alias map="{fileElement: files.0}">
<f:if condition="{fileElement}">
Dateigröße: {v:media.size(path: fileElement.originalResource.publicUrl) -> f:format.bytes(decimals: 2, decimalSeparator: '.', thousandsSeparator: ',')}
</f:if>
</f:alias>
Oder einfach — und ohne 3rd Party ViewHelper :
{fileElement.originalResource.originalFile.properties.size -> f:format.bytes()}