Refactorizacion de PDFs y cambio de biblioteca backend 1.0.19 v2
This commit is contained in:
@@ -1783,7 +1783,11 @@ def export_inspection_to_pdf(
|
|||||||
pdf_url = f"{S3_ENDPOINT}/{S3_PDF_BUCKET}/{s3_key}"
|
pdf_url = f"{S3_ENDPOINT}/{S3_PDF_BUCKET}/{s3_key}"
|
||||||
inspection.pdf_url = pdf_url
|
inspection.pdf_url = pdf_url
|
||||||
db.commit()
|
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 =============
|
# ============= HEALTH CHECK =============
|
||||||
|
|||||||
Reference in New Issue
Block a user