Upload files to "/"

This commit is contained in:
2026-06-07 14:29:25 +00:00
parent 27a6ee5101
commit 10286cfb0e
4 changed files with 404 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import http.server, socketserver, os
PORT = 8080
os.chdir(os.path.dirname(os.path.abspath(__file__)))
class Handler(http.server.SimpleHTTPRequestHandler):
def log_message(self, fmt, *args):
pass
socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(('', PORT), Handler) as httpd:
print(f'Serving on http://localhost:{PORT}')
httpd.serve_forever()