[GH-ISSUE #1418] Cannot upload document #12487

Closed
opened 2026-04-19 19:25:22 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @cellulosa on GitHub (Apr 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1418

Bug Report

Description

Bug Summary:
When I click on the + icon and select a document, I receive error 400.
RAG works if I place the very same document on the /docs folder and run a Scan.

Steps to Reproduce:
I am running the service with docker-compose:

services:

  open-webui:
    container_name: open-webui
    image: ghcr.io/open-webui/open-webui:main
    volumes:
      - ${DOCKER_CONFIG_DIR}/open-webui:/app/backend/data
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY}

Expected Behavior:
The documents gets uploaded and stored in the /docs folder.

Actual Behavior:
When I try to upload a document, I see this error being thrown in the backend (see below).

Environment

  • Operating System: MacOS Sonoma 14.4.1 on Apple M2
  • Browser (if applicable): Firefox 124.0.1 (64-bit)

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:

open-webui          | INFO:apps.rag.main:file.content_type: application/pdf
open-webui          | ERROR:apps.rag.main:400: Something went wrong :/
open-webui          | Traceback (most recent call last):
open-webui          |   File "/app/backend/apps/rag/main.py", line 464, in store_doc
open-webui          |     raise HTTPException(
open-webui          | fastapi.exceptions.HTTPException: 400: Something went wrong :/
open-webui          | 
open-webui          | INFO:     10.5.0.2:0 - "POST /rag/api/v1/doc HTTP/1.1" 400 Bad Request

Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

Installation Method

Docker-compose

Originally created by @cellulosa on GitHub (Apr 4, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1418 # Bug Report ## Description **Bug Summary:** When I click on the + icon and select a document, I receive error 400. RAG works if I place the very same document on the `/docs` folder and run a `Scan`. **Steps to Reproduce:** I am running the service with `docker-compose`: ```yml services: open-webui: container_name: open-webui image: ghcr.io/open-webui/open-webui:main volumes: - ${DOCKER_CONFIG_DIR}/open-webui:/app/backend/data environment: - OPENAI_API_KEY=${OPENAI_API_KEY} - WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY} ``` **Expected Behavior:** The documents gets uploaded and stored in the `/docs` folder. **Actual Behavior:** When I try to upload a document, I see this error being thrown in the backend (see below). ## Environment - **Operating System:** MacOS Sonoma 14.4.1 on Apple M2 - **Browser (if applicable):** Firefox 124.0.1 (64-bit) ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [x] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** ```shell open-webui | INFO:apps.rag.main:file.content_type: application/pdf open-webui | ERROR:apps.rag.main:400: Something went wrong :/ open-webui | Traceback (most recent call last): open-webui | File "/app/backend/apps/rag/main.py", line 464, in store_doc open-webui | raise HTTPException( open-webui | fastapi.exceptions.HTTPException: 400: Something went wrong :/ open-webui | open-webui | INFO: 10.5.0.2:0 - "POST /rag/api/v1/doc HTTP/1.1" 400 Bad Request ``` **Screenshots (if applicable):** [Attach any relevant screenshots to help illustrate the issue] ## Installation Method Docker-compose
Author
Owner

@ChekeGT commented on GitHub (Apr 4, 2024):

Hi bro, having the same issue atm, what kind of document are you trying to upload? For me it seems that it is for some reason not able to parse certain pdfs that contain images

<!-- gh-comment-id:2037898614 --> @ChekeGT commented on GitHub (Apr 4, 2024): Hi bro, having the same issue atm, what kind of document are you trying to upload? For me it seems that it is for some reason not able to parse certain pdfs that contain images
Author
Owner

@taidbui commented on GitHub (Apr 4, 2024):

Same issue here.

<!-- gh-comment-id:2038131595 --> @taidbui commented on GitHub (Apr 4, 2024): Same issue here.
Author
Owner

@frankwatson commented on GitHub (Apr 4, 2024):

I am also receiving the same error on PDFs with images with the most recent update. Moving back to the previous release the error is gone.

Seems to be the same issue as #1417

<!-- gh-comment-id:2038134831 --> @frankwatson commented on GitHub (Apr 4, 2024): I am also receiving the same error on PDFs with images with the most recent update. Moving back to the previous release the error is gone. Seems to be the same issue as #1417
Author
Owner

@ChekeGT commented on GitHub (Apr 4, 2024):

Found a workaround for this, just change the name of the file and it should parse it ok, no idea the reason why though

<!-- gh-comment-id:2038454101 --> @ChekeGT commented on GitHub (Apr 4, 2024): Found a workaround for this, just change the name of the file and it should parse it ok, no idea the reason why though
Author
Owner

@tjbck commented on GitHub (Apr 5, 2024):

Should be fixed, let me know if the issue persists!

<!-- gh-comment-id:2038545411 --> @tjbck commented on GitHub (Apr 5, 2024): Should be fixed, let me know if the issue persists!
Author
Owner

@jingyibo123 commented on GitHub (Apr 11, 2024):

@tjbck Problem encountered when trying to load pdf with chinese character in filename, ollama version 0.1.30

<!-- gh-comment-id:2049142538 --> @jingyibo123 commented on GitHub (Apr 11, 2024): @tjbck Problem encountered when trying to load pdf with chinese character in filename, ollama version `0.1.30`
Author
Owner

@justinh-rahb commented on GitHub (Apr 11, 2024):

@tjbck Problem encountered when trying to load pdf with chinese character in filename, ollama version 0.1.30

Change the file name, re-upload.

<!-- gh-comment-id:2049551057 --> @justinh-rahb commented on GitHub (Apr 11, 2024): > @tjbck Problem encountered when trying to load pdf with chinese character in filename, ollama version `0.1.30` Change the file name, re-upload.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#12487