Jump to content

URL to PDF


gregory
 Share

Recommended Posts

Hi everyone.
I can't see the PDF uploaded via a field called "pdf".

I get a url like this: http://localhost:8888/mywebsite/site/assets/files/1129/test.pdf%EF%BB%BF%EF%BB%BF

Could anyone help me? Thank you.

<?php
foreach($page->case_studies as $item) {
  if($item->type == 'contenuto') {
    echo "
      <a class='btn btn-primary btn-sm' target='blank' href='{$item->pdf->first()->url}' role='button'>Download</a>
    ";
  }
}
?>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...