diff options
Diffstat (limited to 'uploader/__init__.py')
| -rw-r--r-- | uploader/__init__.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/uploader/__init__.py b/uploader/__init__.py index 32eabba..46689c5 100644 --- a/uploader/__init__.py +++ b/uploader/__init__.py @@ -79,18 +79,19 @@ def __setup_scratch_directory__(app: Flask) -> Flask: return app def __setup_upload_directory__(app: Flask) -> Flask: - if app.config.get("UPLOAD_DIRECTORY", "").strip() == "": - app.config["UPLOAD_DIRECTORY"] = app.config[ + if app.config.get("UPLOADS_DIRECTORY", "").strip() == "": + app.config["UPLOADS_DIRECTORY"] = app.config[ "SCRATCH_DIRECTORY"].joinpath("uploads") else: - app.config["UPLOAD_DIRECTORY"] = Path( - app.config["UPLOAD_DIRECTORY"].strip()).absolute() + app.config["UPLOADS_DIRECTORY"] = Path( + app.config["UPLOADS_DIRECTORY"].strip()).absolute() return app def update_unspecified_defaults(app: Flask) -> Flask: - """Setup the defaults for necessary configurations that do not have values specified for them.""" + """Setup the defaults for necessary configurations that do not have values + specified for them.""" return __setup_upload_directory__(__setup_scratch_directory__(app)) |
