Implemented control commands and tests. Rewritten error and session/flash handling.

This commit is contained in:
Leo Vasanko
2023-10-21 04:44:43 +03:00
committed by Leo Vasanko
parent 9939cb33fa
commit e90174a09d
7 changed files with 194 additions and 38 deletions

View File

@@ -5,7 +5,7 @@ from pathlib import Path, PurePosixPath
from pathvalidate import sanitize_filepath
from . import config
from . import config, protocol
from .asynclink import AsyncLink
from .lrucache import LRUCache
@@ -80,6 +80,8 @@ class FileServer:
try:
for req in slink:
with req as (command, *args):
if command == "control":
self.control(*args)
if command == "upload":
req.set_result(self.upload(*args))
elif command == "download":