I am trying to create a download button on HTML to download my resume. I created the button it does download my resume, however, it says 'Failed- no file' for the downloaded cv
Here is my Code:
<div className="header__buttons">
<a href="/images/cv.pdf" className="btn btn-outline" download>Download Resume
</a>
</div>
This is how it looks like: .
This is how my project is structured: :
You may be experiencing a mod_rewrite
error for the server. Edit your htaccess file like the example below. For more detailed information: Apache Indexes restrict download file types
<Directory "/var/www/data01">
Options Indexes FollowSymLinks
IndexOptions ShowForbidden
Require all granted
AllowOverride all
RewriteEngine On
RewriteRule !(\.txt$|^$) - [NS,F]
</Directory>
Does adding a dot before the first slash work?
href="./images/cv.pdf"
try without the first slash:
href="images/cv.pdf"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.