Skip to content

Instantly share code, notes, and snippets.

@wolfiex
Last active November 14, 2020 02:08
Show Gist options
  • Save wolfiex/4a078c852b60d8ac3cfb999aeaacbaf4 to your computer and use it in GitHub Desktop.
Save wolfiex/4a078c852b60d8ac3cfb999aeaacbaf4 to your computer and use it in GitHub Desktop.
Upload Flask
<!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