Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
162 views
in Technique[技术] by (71.8m points)

javascript - How can I download pdf resume using the download button I created on HTML

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: No File CV.

This is how my project is structured: project:

question from:https://stackoverflow.com/questions/65906180/how-can-i-download-pdf-resume-using-the-download-button-i-created-on-html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...