Commit 127df0d6 127df0d66017d1731016b358ae19a76ed51b161d by 沈秋雨

Use MinerU files multipart field

1 parent 599453fa
...@@ -135,7 +135,7 @@ def parse_pdf_with_http( ...@@ -135,7 +135,7 @@ def parse_pdf_with_http(
135 with target.open("rb") as file: 135 with target.open("rb") as file:
136 response = requests.post( 136 response = requests.post(
137 f"{base_url}{endpoint}", 137 f"{base_url}{endpoint}",
138 files={"file": (target.name, file, "application/pdf")}, 138 files=[("files", (target.name, file, "application/pdf"))],
139 headers=headers, 139 headers=headers,
140 timeout=int(mineru_config.get("timeout_seconds", 600)), 140 timeout=int(mineru_config.get("timeout_seconds", 600)),
141 ) 141 )
......