Files
zhayujieandcowagent ce3bbce2c0 fix: scope upload preview URLs to the selected agent
Uploads are stored per agent under <workspace>/tmp, but /upload returned a
preview_url without the agent, so /uploads/<name> resolved against the default
agent's tmp. Under any non-default agent the attachment 404'd and rendered as a
broken thumbnail.

Multipart uploads also ignored the agent entirely and always wrote to the
default workspace: the client sends it in the query string (a field present in
both query and body arrives as a list and breaks handlers), while the handler
read the body alone via rawinput("post").

Both upload routes now resolve the agent and name it in the URL they hand back,
matching what the voice ASR and TTS paths already did.

Co-authored-by: cowagent <cow@cowagent.ai>
2026-09-17 17:03:49 +08:00
..