File size: 1,734 Bytes
2ace788
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>

        body {

            padding: 20px;

            box-sizing: border-box;

        }

    </style>
    <title>Uploaded Files</title>
</head>
<body>
    <h2 style="text-align: center; font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-weight: bold;">Uploaded Files</h2>
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <ul>
            {% for message in messages %}
                <li>{{ message }}</li>
            {% endfor %}
            </ul>
        {% endif %}
    {% endwith %}
    <ol type="1">
        {% for file in files %}
            <li>
                <div style="display: flex; justify-content: space-between;">
                    <a style="text-decoration: none; color: green; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-weight: bold;" href="{{ url_for('uploaded_file', filename=file) }}"> &nbsp;&nbsp;{{ file }} ⬇️</a>
                    <form action="{{ url_for('delete_file', filename=file) }}" method="post" style="display:inline;">
                        <input style="cursor: pointer; background-color: rgb(255, 0, 0); border: none; padding: 10px; color: aliceblue; font-weight: bold; border-radius: 12px;" type="submit" value="Delete 🗑️">
                    </form>
                </div>
            </li>
        {% endfor %}
    </ol>
</body>
</html>