I've implemented a content type which includes a file
field.
articles:
fields:
title:
type: text
body:
type: html
attachment:
type: file
When I go to output the information in a template I access the file with:
record.attachment
However this only provides me with the path of the file and nothing else.
Question: Is it possible to get the filesize and a human friendly filename from the record object? Or do I have to create a Twig function in an extension to do this?
An alternative?
I guess the alternative would be to create a files
contenttype with fields for name, size, etc. Then relate this back to my article.