mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #19721] issue: API /file upload and adding to collection -> "400: The content provided is empty" #18966
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @deliciousbob on GitHub (Dec 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19721
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.41
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Actual Behavior
File get uploaded and precession with Post API to /files Endpoint
Returns a ID & StatusCode: 200
2.1. Entry created in DB: data = "{""status"": ""failed"", ""error"": ""Stream has ended unexpectedly"", ""content"": """"}"
2.2. OWUI Logs show:
2025-12-03 16:04:50.800 | INFO | open_webui.routers.files:upload_file_handler:182 - file.content_type: application/pdf 2025-12-03 16:04:50.804 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - IP-Address - "POST /api/v1/files/?process=true&internal=false HTTP/1.1" 200 2025-12-03 16:04:50.805 | WARNING | pypdf._utils:logger_warning:457 - invalid pdf header: b'\n\n\n\n\n' 2025-12-03 16:04:50.811 | WARNING | pypdf._utils:logger_warning:457 - EOF marker not found 2025-12-03 16:04:50.812 | ERROR | open_webui.routers.retrieval:process_file:1651 - Stream has ended unexpectedly File "/usr/local/lib/python3.11/site-packages/pypdf/_utils.py", line 316, in read_previous_line raise PdfStreamError(STREAM_TRUNCATED_PREMATURELY) │ └ 'Stream has ended unexpectedly' └ <class 'pypdf.errors.PdfStreamError'> pypdf.errors.PdfStreamError: Stream has ended unexpectedly 2025-12-03 16:04:50.815 | ERROR | open_webui.routers.files:process_uploaded_file:142 - Error processing file: 70a7ee8b-2a38-4d5f-9f19-cdcfeefeb266Add ID to Knolwedge collection via /knowledge/file.id/file/add
4.1. Response 400: 400: The content provided is empty. Please ensure that there is text or data present before proceeding.
I saw that
Steps to Reproduce
See: Actual Behavior
Logs & Screenshots
See description, but i can provide further logs if neeeded
Additional Information
It was working all fine in Version 0.6.25 (as far as i can remember), something must have changed since then.
@owui-terminator[bot] commented on GitHub (Dec 3, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19701 issue: knowledge can not multiple upload file
by willy808 • Dec 03, 2025 •
bug#19519 issue: Base64 encoded images included in API responses
by luke-wren • Nov 26, 2025 •
bug#14664 issue: Upload to knowledge base sometimes fails with error 400 The content provided is empty
by YetheSamartaka • Jun 04, 2025 •
bug#19558 issue: When using the “Upload a document” feature in the chat, it returns the following message: “Please provide the content of the attachment. I will prepare a summary based on the information in the file.”
by jiunmoon • Nov 28, 2025 •
bug#17446 issue: file upload bug from 0.6.23
by K7cl • Sep 14, 2025 •
bugShow 5 more related issues
#14432 issue: After update /api/v1/retrieval/query/collection return 400
by SebaGue • May 28, 2025 •
bug#18142 issue: File upload not working ("list index out of range")
by Elwag • Oct 08, 2025 •
bug#15190 issue: The content provided is empty. Please ensure that there is text or data present before proceeding.
by Farmouss • Jun 21, 2025 •
bug#19496 issue: 500 internal server error appears in v0.6.40
by cloudtuotuo • Nov 26, 2025 •
bug#13574 issue: /api/v1/files/ upload endpoint succeeds, but file is not processed (data.content remains empty)
by LosaLosSantos • May 06, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@rgaricano commented on GitHub (Dec 3, 2025):
Possible Causes:
Solutions:
@Classic298 commented on GitHub (Dec 3, 2025):
Or the configured content extraction engine could not extract any content from the PDF