Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillkuettel committed Jul 10, 2024
1 parent fb3154e commit 42c5020
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/privatim/file/setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
"""
Setup static file storage.
"""
import logging
from pathlib import Path
from typing import Any

from libcloud.storage.drivers.local import LocalStorageDriver
from sqlalchemy_file.storage import StorageManager

log = logging.getLogger(__name__)


def setup_filestorage(settings: Any) -> None:
"""
Configure storage of static assets
"""
documents_dir = Path(settings.get('documents_dir', 'uploads'))
log.error(f'documents_dir: {documents_dir}')

asset_dir = documents_dir / 'assets'
asset_dir.mkdir(exist_ok=True, parents=True)

Expand Down

0 comments on commit 42c5020

Please sign in to comment.