如何在我的个人作品集中链接本地文件?

huangapple go评论78阅读模式
英文:

How to link a local file on my personal portfolio?

问题

我正在尝试将我的简历(位于我的本地驱动器上)链接到我的作品集,但在部署后它不起作用。出现奇怪的情况是,它只在预览中起作用,但现在根本不显示任何内容。

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

有人知道这里发生了什么吗?我刚刚开始学习网页设计,所以任何帮助都会非常感激!

我想创建一个链接到我的简历的链接,可以在另一个选项卡中打开。在从Visual Studio的复制路径预览中,它可以正常工作,但当我将其部署到我的网站时就不行了。这个链接位于我的顶部导航上,所以我想知道是否只有与我的GitHub链接的页面才能在我的导航中工作?

英文:

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?

答案1

得分: 0

当您将您的网站部署到Web服务器时,计算机上本地文件的文件路径将不再起作用。File:///协议是特定于计算机上本地文件访问的,无法从其他计算机或在您的网站在线部署时访问。

要解决这个问题,您需要使您的简历文件在Web上可访问。

  1. 将您的简历文件上传到您网站的服务器或文件托管服务,可以使用FTP、Dropbox或Google Drive。
  2. 一旦您的简历文件上传完成,您需要更新您的作品集中的链接,指向文件的在线位置。
<a href="https://www.example.com/resume/Name's%20resume.pdf" target="_blank">简历</a>

记得在进行这些更改后测试链接,确保它按预期工作。

英文:

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.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

&lt;a href=&quot;https://www.example.com/resume/Name&#39;s%20resume.pdf&quot; target=&quot;_blank&quot;&gt;Resume&lt;/a&gt;

<!-- end snippet -->

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

答案2

得分: 0

如果您将您的投资组合页面部署到网络上,那么存储在本地存储中的简历文件将无法访问。为了克服这个问题,请将您的文件上传到云端,比如Google Drive、DropBox,并生成链接,然后使用以下代码:

<a href="//粘贴生成的链接" target="_blank">简历</a>

希望这对您有帮助!

英文:

If you deploy your portfolio page on web, then the resume file stored in the local storage will not be accessible. To overcome this Upload your file in cloud
, like Google Drive, DropBox and generate the link for it, Then

&lt;a href=&quot;//Paste the Generated Link&quot; target=&quot;_blank&quot;&gt;Resume&lt;/a&gt;

Hope this would be helpful!

huangapple
  • 本文由 发表于 2023年6月8日 01:49:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76425878.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定