Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Do you have any other method to download file from button. Because i need stylish download button. i wanna change background color and font so on...

i only have this one:

in Flask:

return send_from_directory(directory=uploads, filename=fiiilename)

in HTML:

<center>
<p class="big">
<ul>
<a href="{{ url_for('download', filename=fiiilename) }}" style="color:#000000;">
<b>Click Download msword</b>
</a>
</ul>
</p>
</center>

also this one is not working in my code: https://pypi.org/project/flask-download-btn/

question from:https://stackoverflow.com/questions/65623741/python-flask-download-button-example

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

1 Answer

i found answer:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      .button {
        display: inline-block;
        padding: 10px 20px;
        text-align: center;
        text-decoration: none;
        color: #ffffff;
        background-color: #7aa8b7;
        border-radius: 6px;
        outline: none;
      }
    </style>
  </head>
  <body>
    <a class="button" href="https://www.w3docs.com/learn-html/html-button-tag.html">HTML button tag</a>
  </body>
</html>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...