[backport core/1.42] fix: use server response filename in WebcamCapture serialization (#10872)

Backport of #10220 to `core/1.42`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-10872-backport-core-1-42-fix-use-server-response-filename-in-WebcamCapture-serialization-33a6d73d36508100ab57d2e62ca08cbb)
by [Unito](https://www.unito.io)

Co-authored-by: Deep Mehta <42841935+deepme987@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Comfy Org PR Bot
2026-04-07 06:27:15 +09:00
committed by GitHub
parent 8deca4459d
commit 9d19131d3f

View File

@@ -142,7 +142,10 @@ app.registerExtension({
useToastStore().addAlert(err)
throw new Error(err)
}
return `webcam/${name} [temp]`
const data = await resp.json()
const serverName = data.name ?? name
const subfolder = data.subfolder ?? 'webcam'
return `${subfolder}/${serverName} [temp]`
}
// @ts-expect-error fixme ts strict error