简体   繁体   English

找不到 pdf 资产文件 (HTML) 的 404 为什么?

[英]404 not found for pdf asset file (HTML) why?

I have the following html in my resume.html file.我的resume.html文件中有以下 html 。

  <a target="_blank" href="./resume.pdf">Download PDF Version</a>

When I view this locally on my computer and try to download the pdf, a new tab is opened with my pdf available for download.当我在我的计算机上本地查看此内容并尝试下载 pdf 时,会打开一个新选项卡,其中我的 pdf 可供下载。 That is the behavior I want.这就是我想要的行为。

However, by deploying my files and clicking on this button, I have the following error:但是,通过部署我的文件并单击此按钮,我有以下错误:

在此处输入图像描述

What could be the reason that my file cannot be found.找不到我的文件的原因可能是什么。 Could it be http/https?会不会是http/https? or some other issue.或其他一些问题。 This should be a no brainer but I can't get this to work.这应该是没有道理的,但我无法让它工作。 Why can't it be found, it is able to be located when I open it locally.为什么找不到,我在本地打开就能找到。

The solution that I found was a simple fix in hosting.我找到的解决方案是托管方面的简单修复。 I switched from the free service surge onto github pages and the issue resolved itself.我从免费服务surge切换到 github 页面,问题自行解决。

For more information regarding surge and pdfs.有关浪涌和 pdf 的更多信息。 Refer to the following link.请参阅以下链接。

Surge hosting and pdf issues Surge 托管和 pdf 问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM