fix: WeasyPrint URL fetcher + attachment improvements + webhook error propagation + WebSocket conversation check + RLS disabled on system tables (bootstrap fix)
Check Cross-Plugin Imports / check (push) Has been cancelled

This commit is contained in:
Agent Zero
2026-07-29 13:19:21 +02:00
parent 9bd6936d17
commit f1a2484055
6 changed files with 119 additions and 9 deletions
+11 -5
View File
@@ -94,13 +94,19 @@ async def download_attachment(
raise HTTPException(404, detail={"detail": "Attachment not found", "code": "not_found"})
file_path = data["file_path"]
if not os.path.isfile(file_path):
raise HTTPException(404, detail={"detail": "File not found on disk", "code": "file_missing"})
# Use storage backend instead of os.path.isfile (P1.1 fix)
from app.core.storage import get_storage_backend
storage = get_storage_backend()
try:
file_bytes = await storage.load(file_path)
except Exception:
raise HTTPException(404, detail={"detail": "File not found in storage", "code": "file_missing"})
return FileResponse(
path=file_path,
filename=data["filename"],
from fastapi.responses import Response
return Response(
content=file_bytes,
media_type=data["mime_type"],
headers={"Content-Disposition": f'attachment; filename="{data["filename"]}"'},
)