v1.0.121: fix ZIP — hex-encode file content for PostgreSQL bytea
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user