{% extends base.html %} {% block title %} Download Server {% end %} {% block content %}

点击上传文件夹,或将文件拖拽到此处(截图可直接Ctrl+V粘贴上传)

{% import os, urllib.parse %}
当前位置: {% set paths = handler.request.path.rstrip('/').split('/') %} {% for i, path in enumerate(paths) %} {% if i == 0 %} Home {% else %} {{ urllib.parse.unquote(path) }} {% end %} {% end %}
{% for entry in entries %} {% end %}
{% if handler.get_cookie('display') %}预览模式{% else %}一般模式{% end %} | 文件总数: {{ handler.args.total }} | 返回上一级 操作 修改时间 文件大小
{% if handler.get_cookie('display') and entry[0].suffix.lower() in ['.jpg', '.jpeg', '.png', '.bmp', '.gif', '.webp', '.svg'] %} {% elif handler.get_cookie('display') and entry[0].suffix.lower() in ['.mp4'] %} {% elif handler.get_cookie('display') and entry[0].suffix.lower() in ['.mp3', '.amr', '.ogg', '.wav'] %} {% else %} {% set icon = 'folder.png' if entry[3] else handler.icon.get(entry[0].suffix.lower(), 'file.png') %} {% end %} {{ entry[0].name }} {% if entry[0].suffix.lower() in ['.tar', '.gz', '.bz2', '.xz', '.tgz', '.bz2', '.bz', '.zip'] %} {% elif entry[0].suffix.lower() in ['.json', '.yml', '.yaml', '.jpg', '.jpeg', '.ico', '.bmp', '.png', '.mp3', '.mp4', '.ogg', '.pdf', '.txt', '.md', '.py', '.sh', '.h', '.c', '.cpp', '.js', '.css', '.html', '.java', '.go', '.ini', '.vue', '.ipynb'] %} {% elif entry[3] %} {% else %} 下载 {% end %} {{ entry[1] }} {{ entry[2] }}
{% end %} {% block js %} {% end %}