12 lines
356 B
Python
12 lines
356 B
Python
"""Storage helpers for binary annotation assets."""
|
|
|
|
import shutil
|
|
|
|
from app.config import settings
|
|
|
|
|
|
def delete_asset_directory(document_id: str) -> None:
|
|
"""Delete all uploaded annotation assets belonging to a document."""
|
|
directory = settings.PDF_STORAGE_PATH / "assets" / document_id
|
|
if directory.exists():
|
|
shutil.rmtree(directory)
|