From b304fbbb8647a17002f806f60c87fa3226d78ff3 Mon Sep 17 00:00:00 2001 From: ronalds Date: Mon, 24 Nov 2025 18:13:01 -0300 Subject: [PATCH] Refactorizacion de PDFs y cambio de biblioteca backend 1.0.19 v2 --- backend/app/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app/main.py b/backend/app/main.py index 1c0d934..a990a31 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1783,7 +1783,11 @@ def export_inspection_to_pdf( pdf_url = f"{S3_ENDPOINT}/{S3_PDF_BUCKET}/{s3_key}" inspection.pdf_url = pdf_url db.commit() - return {"pdf_url": pdf_url} + # Descargar el PDF directamente + buffer.seek(0) + return StreamingResponse(buffer, media_type="application/pdf", headers={ + "Content-Disposition": f"attachment; filename={filename}" + }) # ============= HEALTH CHECK =============