From 96e06d24017e138d60f2047733d4a0fd37769131 Mon Sep 17 00:00:00 2001 From: mattie ruth backman Date: Wed, 4 Feb 2026 17:04:37 -0500 Subject: [PATCH] Update /files/ upload response to match RTVI format, rather than inventing a new one --- src/pipecat/runner/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pipecat/runner/run.py b/src/pipecat/runner/run.py index 40b8bc6f8..19f701fed 100644 --- a/src/pipecat/runner/run.py +++ b/src/pipecat/runner/run.py @@ -308,9 +308,10 @@ def _setup_webrtc_routes(app: FastAPI, args: argparse.Namespace): # Use original filename only for format/mime in response original_name = Path(file.filename or "").name media_type, _ = mimetypes.guess_type(original_name, strict=False) + # Return the file as a URL that can be used in the client, matching the format of RTVIFile return { "name": original_name, - "source": f"/files/{safe_name}", + "source": {"type": "url", "url": f"/files/{safe_name}"}, "format": media_type, }