mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #16889] feat: Add option to disable Asynchronous File Upload with Polling (allow synchronous/“process-now” mode) #33617
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 @MrDick-11 on GitHub (Aug 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16889
Check Existing Issues
Problem Description
Since v0.6.23 Open WebUI introduced Asynchronous File Upload with Polling (see release notes) which changed file handling semantics: after POST /api/v1/files/ backend returns a record while extraction/embedding runs in background, so clients observe pending state until processing completes. This broke our existing integrations that relied on immediate (synchronous) availability of extracted content.
References:
– v0.6.23 release notes (async file upload w/ polling).
GitHub
– Design discussion for async + polling due to timeouts (Cloudflare 524) and maintainer link to the refactor.
GitHub
– Tracking issue for “make file upload process async (w/ polling)”.
GitHub
Desired Solution you'd like
Request: please add a configurable option to opt-out from async upload for server-side API callers, e.g.:
Env var: ASYNC_FILE_UPLOAD=false (global default), or
API flag on upload: POST /api/v1/files?processSync=true to block until extraction/embedding finishes, returning the final file object (as pre-0.6.23 behavior).
Why: some backend integrations (no browser/UI) are simpler and more reliable with a single blocking call (no polling/state machine). We’re OK with longer request times on our own infra (no Cloudflare/60s limit), and we handle larger timeouts.
Alternatives Considered
Acceptance criteria:
When sync mode is enabled, POST /api/v1/files returns only after extraction/embedding completes; returned JSON includes populated data/hash and the file is immediately usable in RAG/knowledge.
When async mode is enabled (default), behavior remains unchanged (202/200 + polling on the client side).
Clear docs for both modes and any server-side timeout knobs affecting sync behavior.
Notes: Today there is a process query param, but it only toggles whether to start processing, not whether the call waits for completion. A true “sync” path would eliminate extra polling code on the client.
Additional Context
No response
@tjbck commented on GitHub (Aug 25, 2025):
Will take a look.
@tjbck commented on GitHub (Aug 25, 2025):
Addressed with
c61698efcf