【发布时间】:2022-07-21 22:47:28
【问题描述】:
我正在尝试通过 httpx lib 向gotenberg 容器发送数据。
r = httpx.post(
"http://doc-to-pdf:3000/forms/chromium/convert/html",
files={
"index.html": file_bytes,
},
params={
"marginTop": 0.4,
"marginBottom": 0.45, # 0.39 minimum for appending page number
"marginLeft": 0.1,
"marginRight": 0.1,
},
)
但我有错误
('Error from gotenberg, %r , %r', 400, b"Invalid form data: form file 'index.html' is required")
关于为什么文件名不通过 httpx lib 传递的任何想法
【问题讨论】: