mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-11 03:38:02 +00:00
fix: Datalab Marker extraction fails on installs outside the Docker image (#32164)
With Datalab Marker as the content extraction engine, every file upload it processed failed on pip and source installs with `Permission denied: '/app'`, because Open WebUI saved a copy of the extracted text under `/app`, a folder that only exists inside the Docker image. That copy now goes to the uploads folder inside `DATA_DIR`, so extraction works on any install. Docker installs with the default data directory keep the same location. Fixes #32025
This commit is contained in:
parent
c9f9c4b1da
commit
8fa22d0997
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ from typing import List, Optional
|
|||
import requests
|
||||
from fastapi import HTTPException, status
|
||||
from langchain_core.documents import Document
|
||||
from open_webui.config import UPLOAD_DIR
|
||||
from open_webui.utils.json_codec import JSONCodec
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
@ -208,7 +209,7 @@ class DatalabMarkerLoader:
|
|||
detail='Marker returned empty content',
|
||||
)
|
||||
|
||||
marker_output_dir = os.path.join('/app/backend/data/uploads', 'marker_output')
|
||||
marker_output_dir = os.path.join(UPLOAD_DIR, 'marker_output')
|
||||
os.makedirs(marker_output_dir, exist_ok=True)
|
||||
|
||||
file_ext_map = {'markdown': 'md', 'json': 'json', 'html': 'html'}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue