0

I have an anchor tag (a href) defined with the path for my resume. The resume is in the public folder in a folder but when i click on the "My CV" button all i get back is Failed no file?

The anchor tag and button

files & folders

Yousaf
  • 27,861
  • 6
  • 44
  • 69
Fancy Man
  • 9
  • 2

2 Answers2

1

just checked on my code, seems you need to place a tag inside the button not above:

<button>
    <a
        href='/pathToPdf.pdf'
        target='_blank'
        rel='noopener noreferrer'
    >
        RESUME
    </a>
</button>
antokhio
  • 1,497
  • 2
  • 11
  • 16
0

As i see remove {} from href attribute because it's not JavaScript code then in download meta-attribute you should put your file extenstion ".pdf"

   <button>    
     <a
     href="./public/file.pdf"
     download="mycv.pdf">
     Save
     </a>    
    </button>

Adarsh Madrecha
  • 6,364
  • 11
  • 69
  • 117