Skip to content

Commit 83eb821

Browse files
committed
remove unused url parameter from /files/upload
The experimental url query parameter was never used by any consumer. Open WebUI uses multipart file uploads exclusively. The endpoint now only accepts direct file uploads, and the file parameter is required instead of optional.
1 parent 4e6e273 commit 83eb821

3 files changed

Lines changed: 12 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [0.11.16] - 2026-03-13
8+
9+
### Removed
10+
11+
- 🧹 **Removed experimental `url` parameter from `/files/upload`** — this feature was never used by any known consumer (Open WebUI uses multipart uploads). The endpoint now only accepts direct file uploads.
12+
713
## [0.11.15] - 2026-03-13
814

915
### Changed

open_terminal/main.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -851,39 +851,21 @@ def _glob_sync():
851851
include_in_schema=False,
852852
operation_id="upload_file",
853853
summary="Upload a file",
854-
description="Save a file to the specified path. Provide a `url` to fetch remotely, or send the file directly via multipart form data.",
854+
description="Save a file to the specified path via multipart form data.",
855855
dependencies=[Depends(verify_api_key)],
856856
responses={
857857
401: {"description": "Invalid or missing API key."},
858858
},
859859
)
860860
async def upload_file(
861861
directory: str = Query(..., description="Destination directory for the file."),
862-
url: Optional[str] = Query(
863-
None,
864-
description="URL to download the file from. If omitted, expects a multipart file upload.",
865-
),
866-
file: Optional[UploadFile] = File(
867-
None, description="The file to upload (if no URL provided)."
862+
file: UploadFile = File(
863+
..., description="The file to upload."
868864
),
869865
fs: UserFS = Depends(get_filesystem),
870866
):
871-
if url:
872-
import httpx
873-
from urllib.parse import urlparse
874-
875-
async with httpx.AsyncClient(follow_redirects=True) as client:
876-
response = await client.get(url)
877-
response.raise_for_status()
878-
content = response.content
879-
filename = os.path.basename(urlparse(url).path) or "download"
880-
elif file:
881-
content = await file.read()
882-
filename = os.path.basename(file.filename or "upload")
883-
else:
884-
raise HTTPException(
885-
status_code=400, detail="Provide either 'url' or a file upload."
886-
)
867+
content = await file.read()
868+
filename = os.path.basename(file.filename or "upload")
887869

888870
directory = fs.resolve_path(directory)
889871
path = os.path.normpath(os.path.join(directory, filename))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "open-terminal"
3-
version = "0.11.15"
3+
version = "0.11.16"
44
description = "A remote terminal API."
55
readme = "README.md"
66
authors = [

0 commit comments

Comments
 (0)