diff --git a/lockbox/common/constants.py b/lockbox/common/constants.py index 1181c89..cd88537 100644 --- a/lockbox/common/constants.py +++ b/lockbox/common/constants.py @@ -53,7 +53,7 @@ CONFIG_KEYS = { "verbose_name": "File integrity verification", "native_type": bool, "sensitive": False, - "default": True + "default": True, }, "ENABLE_BROWSABLE_API": { "description": "REST Framework browsable API is enabled (Always enabled if DEBUG is true)", @@ -90,4 +90,11 @@ CONFIG_KEYS = { "sensitive": False, "default": ".", }, + "STORAGE_ABSOLUTE_PATH": { + "description": "Path where files are stored", + "verbose_name": "Storage path", + "native_type": str, + "sensitive": False, + "default": ".", + }, } diff --git a/lockbox/lockbox/settings.py b/lockbox/lockbox/settings.py index 7a521ba..461680d 100644 --- a/lockbox/lockbox/settings.py +++ b/lockbox/lockbox/settings.py @@ -115,7 +115,7 @@ STORAGES = { } # Storage -MEDIA_ROOT = Path("/home/kitty/src/lockbox/FILES") +MEDIA_ROOT = Path(get_config("STORAGE_ABSOLUTE_PATH")) MEDIA_URL = "files/" INCOMPLETE_EXT = ".incomplete" DEFAULT_FILE_HEADER_BYTES = 2048