I am trying to allow my webpage to host pdf to be downloaded from my server. When you click the link, it downloads a file, but the file it downloads does not open. In Adobe it says "it is either not a supported file type or the file has been damaged". In chrome it says the file failed to load.
I know the file is not corrupted because I can open the file just fine in WINSCP (FTP client). Online the code seems very simple yet it is not working for me.
<form class="form-horizontal" style="margin-top:15px;">
<div class="form-group">
<a href ="/documents/Cow.pdf" download>Download</a>
</div>
</form>
The cow.pdf is stored in a folder named documents. The document folder is saved in a folder named template, where all my other HTML pages are saved.
Any help is appreciated. Thank you
Related
I have created a simple html page called index.htm with download links for easy access.
the following simple code does this:
<!DOCTYPE html>
<html>
<body>
<h1>Downloads</h1>
<p>
SureMDM
<br>
<br>
Word
<br>
<br>
Excel
<br>
<br>
Remote Support
</p>
</body>
</html>
in the same location as the index.htm i have all the APK files as well as the teamviewer .exe file
My problem however is that the links for the APK files do not work. I get the error 404 - File or directory not found.
However the link for the teamviewer .exe at the bottom does work. It is interesting to note that the APK files are in the same exact same location as the working .exe
I see that you are running this on an Windows Server.
Try to add the type APK to your IIS MIME Types.
Open IIS Manager
Selection "MIME Type" feature
Add Mime Type
Insert into File type Extension: ".apk"
Insert into MIME type: "application/vnd.android.package-archive"
Hit OK
Restart Server
I have a simple html document locally on my computer that looks like this:
<!DOCTYPE html>
<html>
<h3>
Python Script that partially automates sending my work hours to my boss.
</h3>
download
</html>
In the folder containing this file, I have the automate_emails.zip. When I open this html locally on my computer clicking download works as expected- the .zip downloads. However, when I email the html document to myself, the download no longer works (I think?) because I am now opening the html document from the cloud where it no longer has access to the automate_emails.zip.
How do I fix this so the webpage will have access to the .zip file even when it is not opened locally? Do I need a hosting service for this?
You obviously need to host upload that document somewehere online.
The easiest way would be to host the website and upload the .zip file as well.
Trying to have a link open up to a PDF. I have the href="filename.pdf" - the pdf file is in the same folder as the html file. When I click on the link it opens to a new page (I have it set to open a new page) which says "Cannot GET /filename.pdf". I open the console and it says "Failed to load resource: the server responded with a status of 404 (Not Found)".
I found a solution that works but I don't understand why:
This doesn't work:
<a target="_blank" class="cta-btn cta-btn--resume" href="connerschiller.pdf">View Resume</a>
But this does work:
<a target="_blank" class="cta-btn cta-btn--resume" href="../src/connerschiller.pdf">View Resume</a>
The html file is in the src folder as well.
Ok so the fix I listed above is working when I run it locally, but when I try to open the PDF link on the deployed site on netlify it says "Page Not Found
Looks like you've followed a broken link or entered a URL that doesn't exist on this site."
If the file is in the same directory you need to use as follows:
My pdf
the ./ is to especify the same directory
I have local toc-kind-of html file which has a hyperlink to local ppt file located in the path relative to the directory in which this html file is located. When I open the html file in browser and click on it, instead of opening that local file in Power point application, that file is being again downloaded to my default "Download" folder. In other words since the file is local, it is being copied from current directory to "Download" folder". Since the ppt is local I wanted the link to open in Power point application when I clicked it. Is there any changes to this html file or browser settings needed? The html snipped is below:
<tr>
<td height="18" style="width: 485px"><font color="#0000FF"><b>
</b></font><font color="#0000FF"><b>Training Workshops</b></font> <font size="1">(ppt)</font></td>
</tr>
OS: Windows 10
Browser: New Microsoft Edge
make a folder where your HTML and CSS files exist and paste your ppt then link it
I'm trying to download a file from a link in an HTML file in an Android Studio
Scenario:
Press on "Download" to download an APK file:
Download
I tried with opening google or other pages - it works.
And yes, my link is correct :D