Fix: LocalStorage top-level import in DMS routes
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -21,7 +21,7 @@ from sqlalchemy import select, update
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.core.db import get_db
|
||||
from app.core.storage import get_storage_backend
|
||||
from app.core.storage import get_storage_backend, LocalStorage
|
||||
from app.core.visibility import apply_visibility_filter, check_single_entity_access
|
||||
from app.deps import get_current_user, require_permission
|
||||
from app.plugins.builtins.dms.models import File as DmsFile
|
||||
@@ -919,7 +919,6 @@ async def download_file(
|
||||
raise HTTPException(404, detail={"detail": "File not found on disk", "code": "file_missing"})
|
||||
|
||||
from fastapi.responses import FileResponse as FastApiFileResponse
|
||||
|
||||
if isinstance(storage, LocalStorage):
|
||||
full_path = storage._full_path(dms_file.storage_path)
|
||||
return FastApiFileResponse(
|
||||
|
||||
Reference in New Issue
Block a user