Getting path to audio file using select field

I am using a select field to upload a mp3 file:

label: Mp3
type: select
options: audio

In my template:

<?= $page->track1File()?>

This just returns the filename, how do I get the full path to the file?


$audio = $page->track1File()->toFile();
if($audio): // this check is important before you can call any methods on the object, e.g. the url()

  // do something with audio


thanks Texnixe, you’re a :star2: