test cases

This commit is contained in:
jonaswinkler
2021-01-02 15:25:13 +01:00
parent 7bca5bf40e
commit 97e96d02f2
2 changed files with 62 additions and 1 deletions

View File

@@ -68,7 +68,8 @@ class TikaDocumentParser(DocumentParser):
url = gotenberg_server + "/convert/office"
self.log("info", f"Converting {document_path} to PDF as {pdf_path}")
files = {"files": (file_name, open(document_path, "rb"))}
files = {"files": (file_name or os.path.basename(document_path),
open(document_path, "rb"))}
headers = {}
try: