You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.6 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>临时文件上传</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
* { box-sizing: border-box; }
body {
margin: 0;
padding: 24px 16px;
background: radial-gradient(circle at top, #111827, #0b0f14);
color: #e5e7eb;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial;
min-height: 100vh;
}
.card-box {
max-width: 960px;
margin: auto;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 18px;
padding: 28px;
backdrop-filter: blur(10px);
}
h3 { margin-bottom: 18px; font-size: 18px; }
.form-control {
background: rgba(255,255,255,0.06) !important;
border: 1px solid rgba(255,255,255,0.12) !important;
color: #e5e7eb !important;
}
.table { margin-top: 18px; border-radius: 10px; overflow: hidden; }
.table-dark { --bs-table-bg: #111827; }
.table td, .table th { font-size: 13px; }
.btn-primary { background: #2563eb; border: none; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #16a34a; border: none; }
.auto-clean-badge {
display: inline-block;
margin-left: 8px;
padding: 3px 8px;
font-size: 11px;
font-weight: 500;
color: #f59e0b;
background: rgba(245,158,11,0.12);
border: 1px solid rgba(245,158,11,0.35);
border-radius: 999px;
vertical-align: middle;
}
@media (max-width: 600px) {
body { padding: 16px 12px; }
.card-box { padding: 18px 14px; }
h3 { font-size: 16px; }
.col-md-3 { margin-top: 10px; }
.btn { width: 100%; }
}
</style>
</head>
<body>
<div class="card-box">
<h3>📂 临时文件上传工具 <span class="auto-clean-badge">零点自动清空</span></h3>
<form method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-12 col-md-9">
<input type="file" name="file" class="form-control" required>
</div>
<div class="col-12 col-md-3">
<button class="btn btn-primary w-100">上传文件</button>
</div>
</div>
</form>
{% if message %}
<div class="alert alert-info mt-3">{{message}}</div>
{% endif %}
<h5 class="mt-4">已上传文件</h5>
<table class="table table-dark table-hover">
<thead><tr><th>文件名</th><th>大小(KB)</th><th>操作</th></tr></thead>
<tbody>
{% for file in files %}
<tr>
<td>{{ file.name }}</td>
<td>{{ file.size }}</td>
<td><a href="{{ url_for('temp_download', filename=file.name) }}" class="btn btn-success btn-sm">下载</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</body>
</html>