feat: Organize public uploads into daily directories based on timezone

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2025-11-23 10:43:16 -07:00
parent 979354f87b
commit be5c8dec26
2 changed files with 23 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ class Settings:
log_level: str = "INFO"
chunked_uploads_enabled: bool = False
chunk_size_mb: int = 95
timezone: str = "UTC"
def _hash_password(pw: str) -> str:
"""Return PBKDF2-SHA256 hash of a password."""
@@ -71,6 +72,7 @@ def load_settings() -> Settings:
chunk_size_mb = int(os.getenv("CHUNK_SIZE_MB", "95"))
except ValueError:
chunk_size_mb = 95
timezone = os.getenv("TIMEZONE", "UTC")
return Settings(
admin_password=admin_password,
max_concurrent=maxc,
@@ -81,4 +83,5 @@ def load_settings() -> Settings:
log_level=log_level,
chunked_uploads_enabled=chunked_uploads_enabled,
chunk_size_mb=chunk_size_mb,
timezone=timezone,
)