mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-06 16:58:36 -05:00
[GH-ISSUE #12228] feat: uploading files without backend processing #119827
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 @wangjiyang on GitHub (Mar 31, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12228
Originally assigned to: @tjbck on GitHub.
Check Existing Issues
Problem Description
I am trying to use open webui as a frontend webui, and trying to process user reuqest via chating ui, which open webui has a great user experience and works stable. Thanks for your great work.
We are trying to add more features to make good use of our self-hosted aigc backend. This feature is something like: user upload some files and ask some question", and then our backend (which is driven by pipeline) get original file and processing it and send sse events to pipeline and then emit it to open webui front end. RAG feature or OCR feature(which i don't know) is always trying to extract data into text, which is not a must for our use case. This takes a lot of time and affect user experience. Also, it seems open webui always trying to send raw text to open webui backend, it's also not required by our feature and affect user experience.
So I am requesting one feature that:
Could you please have a discussion of this feature, thanks.
Desired Solution you'd like
Alternatives Considered
No response
Additional Context
No response
@harrywang commented on GitHub (Apr 15, 2025):
Yes. This is needed. Bypass Embedding and Retrieval option does not work for this purpose - I think the chunking, embedding happens when the file is uploaded.
@roeizavida commented on GitHub (Apr 15, 2025):
It would be great if that file can be passed to the LLM using the files API, similar to OpenAI.
This way you can pass text files, images, PDFs directly to the LLM.
@tjbck commented on GitHub (Apr 19, 2025):
@harrywang Chunking, and embedding does NOT happen when the file is uploaded if you have
Bypass Embedding and Retrievalenabled.@Classic298 commented on GitHub (Apr 19, 2025):
A great usecase for this would also be to upload audio files directly to the AI model
For example: upload a audio file directly to a gemini model, so that it can differentiate the different people speaking in the audio and create a comprehensive transcription, complete with person identification.
If this would be possible that'd be cool
@tremlin commented on GitHub (Apr 19, 2025):
We've been trying to implement models in Open WebUI that use tools to operate on files (instead of passing files directly to the AI model). These tools could be a code execution sandbox, a custom backend for file processing, or a remote API where we want the AI to upload the files to (like creating a Jira issue with attachment). If I understand this issue correctly, this is more or less about the same feature.
Ideal for us would be an option that:
We've already tried a few workarounds with Tools and Functions, but these are not powerful enough.
@harrywang commented on GitHub (Apr 19, 2025):
You are right, the following is AI's analysis of the code base for what happens once a file is uploaded in chat. I hope we can disable file upload based on file type for each model.
📁 File Upload Process Flow (Open WebUI)
1. Frontend Initiates Upload
MessageInput.svelte) calls theuploadFileHandlerfunction.uploadFileAPI from$lib/apis/files.FormDataobject is created, the file is appended, and aPOSTrequest is sent to/files/with the user's authentication token.2. Backend Receives the File
upload_fileendpoint in/backend/open_webui/routers/files.py.UploadFileobject via FastAPI.3. File Processing and Storage
LocalStorageProvider– local filesystemS3StorageProvider– Amazon S3GCSStorageProvider– Google Cloud StorageAzureStorageProvider– Azure Blob Storage4. Database Entry Creation
5. Content Extraction and Processing
process=true, the system attempts to extract content:.mp3,.wav,.ogg,.m4a): Transcribed to textdatafield.6. Vector Database Integration
BYPASS_EMBEDDING_AND_RETRIEVALis enabled:file-{file_id}.7. Response to Frontend
8. Frontend Updates UI
🔍 Special File Type Handling
This process enables rich file handling and integration into AI interactions, especially for RAG-based workflows.
@harrywang commented on GitHub (Apr 19, 2025):
Yes. See my comments above. We are hardcoding some conditions to treat images and other files (txt, csv) differently but it would be nice if this can be configured via Admin UI.
@mjp0 commented on GitHub (Apr 20, 2025):
I'd suggest making this a provider/model switch instead of a global switch. With less capable models, the existing processing is great, but with Gemini I want to pass all files everything as-is.
@wangjiyang commented on GitHub (Apr 24, 2025):
yes, introducing a webui configuration for different file types is a good idea, and this switch can be configured per model would be better.
@matjbru commented on GitHub (May 7, 2025):
The option of a complete bypass of any processing on a per model (or per chat) basis would be great. For example, I would like to upload PDFs as-is to Gemini 2.5 via API, due to its excellent PDF processing capability.
@istranic commented on GitHub (May 29, 2025):
For those looking to process files using a custom pipeline, you can fetch the file in the
pipemethod from the OpenWebUI backend using the code below. The awkward part of is that you have to intercept the file and add it to the message history before passing it to your model. There is no record of the file in the conversation history maintained by OpenWebUI, which makes it impossible to build an agentic system that uses the internal conversation history and can reason on top of files that were uploaded earlier in the conversation. It works very well for files pass in the latest invokation of thepipemethod.... i.e. the last user message.TLDR: Please record the presence of files to the conversation history, not just in the body, because the body only contains information for the latest file that was uploaded, and not for the files that were uploaded earlier in that conversation.
@MonsieurBibo commented on GitHub (Jul 3, 2025):
What is the status of this issue ? Is it scheduled to be implemented ? Is help needed ?
@TigerAI-TW commented on GitHub (Jul 6, 2025):
@istranic can you kindly provide this code to pipe markerplace. can it support when uploading file to openwebui then store the file into local folder.
Below is ChatGPT recommended
import os
import time
import json
import base64
import requests
from typing import Optional, Callable, Awaitable, Any, Dict
from pydantic import BaseModel, Field
Define a simple config-like class to store environment variables
class Config:
OPENWEBUI_URL: str = os.getenv("OPENWEBUI_URL", "http://localhost:3000")
OPENWEBUI_API_KEY: str = os.getenv("OPENWEBUI_API_KEY", "")
SAVE_FOLDER: str = os.getenv("UPLOAD_SAVE_DIR", "data/uploads")
class Pipe:
class Valves(BaseModel):
ENABLE_STATUS_INDICATOR: bool = Field(default=True)
EMIT_INTERVAL: float = Field(default=2.0)
@TigerAI-TW commented on GitHub (Jul 6, 2025):
found the work around solution,
when file uploads, it store into OpenWebUI/uploads
We can parse the information to other tool, and execute the following process.
@thinkrivan commented on GitHub (Jul 7, 2025):
the problem is openwebui still tried to inject the file contents with the RAG prompt and it doesnt disable it completely.
@JonasWild commented on GitHub (Jul 14, 2025):
+1
@GmodCentral commented on GitHub (Jul 15, 2025):
I think there should be an option to pass the file name and path to the LLM in context.
Tools like python-docx could easily take advantage of this. I had to make a convoluted work around for my template editor that uses the API to retrieve the proper file names, and build the path to the document. It would have been way easier if this was automatically passed to the llm when it was attached.
https://gitlab.com/gmod-central/owui-word-doc-template-editor
@kevinxschulz commented on GitHub (Aug 29, 2025):
thanks guys, I would also love this feature! We use custom APIs as Tool Servers and some endpoints expect a binary file as parameter.
What is the status of this issue ?
@parthraut45 commented on GitHub (Oct 24, 2025):
Hey is there any update on this , i want to disable embeddings just for csv and excel files , and keep for other file types , Bypass embeddings prevents it from being uploaded completely , saying 401: unsupported file type , is there any workaround to do so
@adhusch commented on GitHub (Feb 18, 2026):
I think this is becoming highly relevant now as skills are now available :-) , e.g. for the case of xlsx files described by @parthraut45 one could now use a skill to process the xlsx files, but for that upload of the raw files is needed.
@Atrocraz commented on GitHub (Mar 6, 2026):
Why is this feat being ignored for almost a year already? This is just common sense.
Here is basic example of why it is needed - random user just casually dropped 30k rows x 20 columns excel file (that is below max file size setting, cause excel almost always much more compact, than PDF for example) in chat, which caused massive lag for other users, paralyzed ollama embeddings endpoint and after 5 minutes failed to process file.
If i was able to catch it with pipeline\filter and process via pandas and\or openpyxl there wouldnt not be problem at all.
This is almost critical issue, imho and really needs to be addressed.
@tjbck is there any fundamental problem with that? give us at least some kind of response, please, this feat request is unanswered for too long
@rgaricano commented on GitHub (Mar 6, 2026):
@Atrocraz,
we can process the files as External Content Extraction Engine, I putted a sample: https://github.com/open-webui/open-webui/discussions/17621
also I did another versions using other libs, as pandas, but I left its half done.
@Atrocraz commented on GitHub (Mar 10, 2026):
@rgaricano the thing is we don't need OCR and RAG for excel at all, it's very bad idea for processing excel tables that way. Absolutely unnecessary.
I guess for now i'll need to modify OWUI core and rebuild container, i don't see any other workaround.
@rgaricano commented on GitHub (Mar 10, 2026):
yes @Atrocraz, it's not necessary, but in this way (using External Content Extraction Engine) you can specify the parser used for each doc type, in my sample I used OCR is for images and pdf files...
e.g. of xls parser using
openpyxllib:@Atrocraz commented on GitHub (Mar 10, 2026):
sorry, i misunderstood at first.
yeah, it's a possible workaround, thank you for sharing, gonna test it soon.
still confused, why devs dont implement it for so long
however if i understand correctly, how OWUI works, excel still will be loaded in RAG even with custom content extraction engine, so it doesnt fully solve issue
@bitsofinfo commented on GitHub (Mar 15, 2026):
please just provide a clear, single toggle option, to default disable all this pre-processing, just let us paste/upload files, b64 encode them and send to the backend model
@Message00 commented on GitHub (Mar 17, 2026):
I think it is a vital issue that needs to be addressed. Are there any updates? Alternatively, is there a temporary workaround available for now? I need to upload the raw files directly to the API provider.
@rgaricano commented on GitHub (Mar 17, 2026):
Until then, a filter function can be useful: Raw_FileHandler_Filter_Function_v0.1.1.py
It intercepts the request before it goes to the model, processes files, converts them to base64 format and embedded directly in the message content (the original files array is removed to prevent duplicate processing)
Installation Steps
raw_file_handler)Configuration
The filter includes configurable valves:
@xec-abailey commented on GitHub (Mar 17, 2026):
I'm going to go the external content extraction engine route for now, but being able to specify to skip processing for certain files BUT keep the file accessible in the chat context is a critical feature for any files with tabular data
For anyone who comes after, here is a diagram as i understand (from researching the docs) how the content extraction engine fits:
@bitsofinfo commented on GitHub (Apr 7, 2026):
@rgaricano trying your filter, getting error (
'UserValves' object has no attribute 'get'). Just uploading a pdf in the chat dialog, no additional text, hit send. v0.8.10@lionelvoser commented on GitHub (Apr 7, 2026):
Adding another use case for this: we use Gemini models that support native PDF input, meaning the raw file can be passed directly to the model API. The current pipeline defeats the purpose of native file handling entirely.
The ideal behavior for us would be model-level configuration of how uploaded files are handled:
Happy to help! What would be most useful?
@bitsofinfo commented on GitHub (Apr 7, 2026):
would be great to just have that toggle to stop all the background processing, just send the docs (just like it currently does w/ images) to the backend like this
@aquan9 commented on GitHub (May 1, 2026):
Generally some capability to be able to decide on a per-file basis whether it gets the RAG treatment or whether it's just uploaded into local storage is something that I think will be important for connecting to arbitrary APIs or MCP instances that accept files.
The per-file basis I say because it would be neat to be able to upload a PDF and an Excel file at the same time and have them be handled differently.
@Classic298 commented on GitHub (May 1, 2026):
Could a file_handler filter type not do that for you?
@Baronco commented on GitHub (May 14, 2026):
Using a filter, you can remove the Excel file from the chat body so it doesn't consume the conversation context. This is useful when users upload spreadsheets with a considerable number of tokens. An Excel file with 10k rows and several columns can easily reach 1 million tokens.
There is no option to make the extraction engine skip specific file types. You can strip the Excel from the conversation to avoid flooding the context, but the extraction engine will still process its content regardless.
I'm not sure if recent versions support configuring the extraction engine to ignore specific file types like
.xlsxonly?Ideal flow:
However, since the extraction engine still processes the file regardless, it generates unnecessary compute overhead.
With a feature like this, Open WebUI could match or even surpass ChatGPT's Excel analysis capabilities 😈
@Classic298 commented on GitHub (May 14, 2026):
@Baronco what you are describing is already possible with open terminal