fix(tika): adapt to Gotenberg 7 API

This commit adapts to the latest breaking changes from Gotenberg 7.
It also freezes the usage of the Gotenberg server to v7.x. Doing
this prevents further breaking changes leaking in our code base.

* refs #1250
This commit is contained in:
Uli Fahrer
2021-08-27 08:32:16 +02:00
parent 384f5fa6fb
commit 3ea164e4d2
6 changed files with 15 additions and 15 deletions

View File

@@ -67,7 +67,7 @@ class TikaDocumentParser(DocumentParser):
def convert_to_pdf(self, document_path, file_name):
pdf_path = os.path.join(self.tempdir, "convert.pdf")
gotenberg_server = settings.PAPERLESS_TIKA_GOTENBERG_ENDPOINT
url = gotenberg_server + "/convert/office"
url = gotenberg_server + "/forms/libreoffice/convert"
self.log("info", f"Converting {document_path} to PDF as {pdf_path}")
files = {"files": (file_name or os.path.basename(document_path),