Skip to content

Instantly share code, notes, and snippets.

@ngbala6
Created June 28, 2020 10:22
Show Gist options
  • Save ngbala6/a162e0eef0a23c24191a0c73acbeff75 to your computer and use it in GitHub Desktop.
Save ngbala6/a162e0eef0a23c24191a0c73acbeff75 to your computer and use it in GitHub Desktop.
<!doctype html>
<title>Python Flask Multiple Files Upload Example</title>
<h2>Select file(s) to upload</h2>
<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="/" enctype="multipart/form-data">
<dl>
<p>
<input type="file" name="files[]" multiple="true" autocomplete="off" required>
</p>
</dl>
<p>
<input type="submit" value="Submit">
</p>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment