mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-18 15:25:20 +00:00
Merge pull request #13085 from ayan4m1/fix/tika-image-ocr
fix: pass extractInlineImages header to Tika if PDF_EXTRACT_IMAGES is true
This commit is contained in:
commit
7d184c3a14
1 changed files with 3 additions and 0 deletions
|
|
@ -99,6 +99,9 @@ class TikaLoader:
|
||||||
else:
|
else:
|
||||||
headers = {}
|
headers = {}
|
||||||
|
|
||||||
|
if self.kwargs.get("PDF_EXTRACT_IMAGES") == True:
|
||||||
|
headers['X-Tika-PDFextractInlineImages'] = 'true'
|
||||||
|
|
||||||
endpoint = self.url
|
endpoint = self.url
|
||||||
if not endpoint.endswith("/"):
|
if not endpoint.endswith("/"):
|
||||||
endpoint += "/"
|
endpoint += "/"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue