This commit is contained in:
Timothy Jaeryang Baek
2026-01-01 14:10:11 +04:00
parent 89565c58c6
commit d3ee3fd23e
4 changed files with 28 additions and 20 deletions
+1 -1
View File
@@ -1546,7 +1546,7 @@ ENABLE_FOLDERS = PersistentConfig(
FOLDER_MAX_FILE_COUNT = PersistentConfig(
"FOLDER_MAX_FILE_COUNT",
"folders.max_file_count",
int(os.environ.get("FOLDER_MAX_FILE_COUNT", "100")),
os.environ.get("FOLDER_MAX_FILE_COUNT", ""),
)
ENABLE_CHANNELS = PersistentConfig(
+6 -2
View File
@@ -1013,7 +1013,7 @@ class AdminConfig(BaseModel):
ENABLE_COMMUNITY_SHARING: bool
ENABLE_MESSAGE_RATING: bool
ENABLE_FOLDERS: bool
FOLDER_MAX_FILE_COUNT: int
FOLDER_MAX_FILE_COUNT: Optional[int | str] = None
ENABLE_CHANNELS: bool
ENABLE_NOTES: bool
ENABLE_USER_WEBHOOKS: bool
@@ -1040,7 +1040,11 @@ async def update_admin_config(
)
request.app.state.config.ENABLE_FOLDERS = form_data.ENABLE_FOLDERS
request.app.state.config.FOLDER_MAX_FILE_COUNT = form_data.FOLDER_MAX_FILE_COUNT
request.app.state.config.FOLDER_MAX_FILE_COUNT = (
int(form_data.FOLDER_MAX_FILE_COUNT)
if form_data.FOLDER_MAX_FILE_COUNT
else None
)
request.app.state.config.ENABLE_CHANNELS = form_data.ENABLE_CHANNELS
request.app.state.config.ENABLE_NOTES = form_data.ENABLE_NOTES