app: refactor upload handler registration

Move upload handler registration out of the file manager.
Register the primary hander in the app module, and the
Octoprint Comptaiblity handler in octoprint_compat.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan
2021-12-21 12:53:59 -05:00
parent ac9eaa7681
commit b369173f94
3 changed files with 5 additions and 3 deletions

View File

@@ -176,6 +176,7 @@ class MoonrakerApp:
"moonraker.log", logfile, force=True)
self.register_static_file_handler(
"klippy.log", DEFAULT_KLIPPY_LOG_PATH, force=True)
self.register_upload_handler("/server/files/upload")
def _get_path_option(self, config: ConfigHelper, option: str) -> str:
path: Optional[str] = config.get(option, None)