Use MinerU files multipart field
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -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 | ) | ... | ... |
-
Please register or sign in to post a comment