Last active
November 14, 2020 02:08
-
-
Save wolfiex/4a078c852b60d8ac3cfb999aeaacbaf4 to your computer and use it in GitHub Desktop.
Upload Flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>File Uploader</title> | |
<style> | |
body, | |
.center { | |
margin: auto; | |
width: 50%; | |
border: 3px solid green; | |
padding: 10px; | |
} | |
</style> | |
<body> | |
{% block content %} | |
<h1 class="title"> | |
Flask Login Example | |
</h1> | |
<h2 class="subtitle"> | |
Easy authentication and authorization in Flask. | |
</h2> {% endblock %} | |
<p> | |
{% with messages = get_flashed_messages() %} {% if messages %} | |
<ul class=flashes> | |
{% for message in messages %} | |
<li>{{ message }}</li> | |
{% endfor %} | |
</ul> | |
{% endif %} {% endwith %} | |
</p> | |
<form method="post" action="/upload" enctype="multipart/form-data"> | |
<div class="box__input"> | |
<dl> | |
<p> upload_key: <input name="psw" type="password" /></p> | |
<p> | |
<input type="file" name="files[]" multiple="true" autocomplete="off" required> | |
</p> | |
</dl> | |
<p> | |
<input type="submit" value="Submit"> | |
</p> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment