mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
feat: uploading files without backend processing #4625
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).
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