Filetype returning whole string

                <p>File Size: <?= $event->callToActionFile()->extension() ?> </p>
            <?php endif ?>

I’m using ->extention() or ->file() and it’s returning the whole file name instead of just .pdf or .xls it’s coming out

brandon.xls or something.pdf any suggestion on how to trim this or make it just show the file extension?


I suppose the field callToActionFile contains a filename?

$file = $event->callToActionFile()->toFile();
if($file) {
  echo $file->extension();

Worked thank you. :slightly_smiling_face: