Rescue Paperjet v1 implementation
This commit is contained in:
parent
7ff5c8130d
commit
db9e2ca51b
83 changed files with 6186 additions and 3894 deletions
12
backend/app/services/assets.py
Normal file
12
backend/app/services/assets.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"""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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue