blob: 38c4a09f028081d57dbcaeb85be01d0b69f2b99d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<html>
<head>
<link rel="stylesheet" href="/static/Server.css">
<script type="text/javascript" src="/static/Server.js"></script>
</head>
<body>
<title>Python Flask File Upload Example</title>
<h2>Select a file to upload</h2>
<p id = "message">
{% 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">
<dl>
<p>
<input type="file" name="file" autocomplete="off" required>
</p>
</dl>
<p>
<input type="submit" value="Submit" onclick="showLoad()">
</p>
</form>
{% if results %}
<form method="get" action="/results">
<button type="submit">Download!</button>
</form>
{% endif %}
</body>
</html>
|