File size: 1,454 Bytes
b16a414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Data Files</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body class="bg-dark text-white">

<div class="container mt-5">
    <h1 class="text-center">Upload or Overwrite Data Files</h1>

    <!-- Upload Form -->
    <form action="{{ url_for('upload_data_file') }}" method="POST" enctype="multipart/form-data" class="mt-4">
        <div class="mb-3">
            <input type="file" name="file" class="form-control" required>
        </div>
        <button type="submit" class="btn btn-success">Upload</button>
    </form>

    <hr>

    <h2 class="mt-5">Uploaded Data Files</h2>

    <!-- List of Uploaded Files -->
    <ul class="list-group mt-3">
        {% if files %}
            {% for file in files %}
                <li class="list-group-item d-flex justify-content-between align-items-center bg-secondary text-white">
                    {{ file }}
                    <a href="{{ url_for('download_files', filename=file) }}" class="btn btn-sm btn-primary">Download</a>
                </li>
            {% endfor %}
        {% else %}
            <li class="list-group-item bg-secondary text-white">No files found.</li>
        {% endif %}
    </ul>
</div>

</body>
</html>