How to get URL from Select blueprint?

Hello everyone,firstly thanks to texnixe for solving my a lot of problems.

I have Select structure field in my blueprint.
Options: documents.
So i can select .pdf files.

But how can i call this .pdf file to URL ?

Here blueprint screenshot ; http://i.hizliresim.com/AnLVzz.png

Something like this:

<?php
// loop through the collection using the `toStructure()` method
foreach($page->documentfiles()->toStructure() as $document):
  // check if the file exists
  if($documentfile = $document->documentfile()->toFile()):
?>
<a href="<?= $documentfile->url() ?>">Download File</a>
 <?php  endif ?>
<?php endforeach ?>
?>
1 Like

Thankss its perfectly worked!