v1.0.121: fix ZIP — hex-encode file content for PostgreSQL bytea

This commit is contained in:
2026-06-23 08:10:38 +04:00
parent b20ec58aff
commit 20e1e0dcb8
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -317,10 +317,11 @@ class Handler(BaseHTTPRequestHandler):
if ext not in ('docx', 'doc', 'pdf'):
continue
# Загрузить в Lucee
# Загрузить в Lucee (hex с \x префиксом для PostgreSQL bytea)
content_hex = "\\x" + content.hex()
resp = httpx.post(
f"{LUCEE_URL}/upload.cfm",
data={"filename": name, "data": content},
data={"filename": name, "data": content_hex},
timeout=30
)
if resp.status_code == 200: