mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-07 08:27:05 +00:00
fix: use configurable AIOHTTP_CLIENT_TIMEOUT for terminal uploads
The hardcoded 60 s total timeout failed deterministically for large files or slow remote storage. Reuse the existing AIOHTTP_CLIENT_TIMEOUT env variable (default 300 s, same one used by the tools router and OpenAI client) so operators can tune it through the same knob they already have.
This commit is contained in:
parent
8416b9cfb5
commit
744cfb8814
1 changed files with 2 additions and 1 deletions
|
|
@ -2947,9 +2947,10 @@ async def upload_file_to_terminal(
|
|||
|
||||
# --- 3. Upload to terminal server ---
|
||||
import aiohttp
|
||||
from open_webui.env import AIOHTTP_CLIENT_TIMEOUT
|
||||
|
||||
async with aiohttp.ClientSession(
|
||||
timeout=aiohttp.ClientTimeout(total=60),
|
||||
timeout=aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT),
|
||||
trust_env=True,
|
||||
) as session:
|
||||
# Query the terminal's current working directory
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue