htmlcsswebportfolio

How to link a local file on my personal portfolio?


I am trying to link my resume (on my local drive) to my portfolio, but it does not work after I deploy it. It only worked in preview for some reason, but now nothing is showing at all.

<a href="File:///Users/My Name/Desktop/portfolioo/Name's resume.pdf" target="_blank">Resume</a>

Does anyone know what's going on here? I am just getting started in web design, so any help is much appreciated!

I wanted to create a link to my resume that would open up on another tab. IT WORKS IN THE COPY PATH PREVIEW FROM VISUAL STUDIO, but not when I deploy it to my website. This link is on my navigation at the top, so I wonder if my nav can only go to pages that are linked to my Github?


Solution

  • When you deploy your website to a web server, the file paths to local files on your computer will not work anymore. The File:/// protocol is specific to local file access on your computer, and it won't be accessible from a different computer or when your website is deployed online.

    To fix this issue, you need to make your resume file accessible on the web.

    1. Upload your resume file to your website's server or to a file hosting service. Using FTP, Dropbox or Google Drive.
    2. Once your resume file is uploaded, you need to update the link in your portfolio to point to the online location of the file.

    <a href="https://www.example.com/resume/Name's%20resume.pdf" target="_blank">Resume</a>

    Remember to test the link after making these changes to ensure it works as expected.