mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 07:30:11 +00:00
Add client_id to query param.
This commit is contained in:
committed by
Jennifer Weber
parent
9a70e927aa
commit
ad2ffdcd85
@@ -323,6 +323,14 @@ export class ComfyApp {
|
||||
return '&rand=' + Math.random()
|
||||
}
|
||||
|
||||
getClientIdParam() {
|
||||
const clientId = window.name
|
||||
if (clientId) {
|
||||
return '&client_id=' + clientId
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
static onClipspaceEditorSave() {
|
||||
if (ComfyApp.clipspace_return_node) {
|
||||
ComfyApp.pasteFromClipspace(ComfyApp.clipspace_return_node)
|
||||
|
||||
@@ -90,10 +90,13 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
|
||||
|
||||
const rand = app.getRandParam()
|
||||
const previewParam = getPreviewParam(node, outputs)
|
||||
const clientIdParam = app.getClientIdParam()
|
||||
|
||||
return outputs.images.map((image) => {
|
||||
const imgUrlPart = new URLSearchParams(image)
|
||||
return api.apiURL(`/view?${imgUrlPart}${previewParam}${rand}`)
|
||||
return api.apiURL(
|
||||
`/view?${imgUrlPart}${previewParam}${rand}${clientIdParam}`
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,11 @@ export class ResultItemImpl {
|
||||
params.set('type', this.type)
|
||||
params.set('subfolder', this.subfolder)
|
||||
|
||||
const clientId = window.name
|
||||
if (clientId) {
|
||||
params.set('client_id', clientId)
|
||||
}
|
||||
|
||||
if (this.format) {
|
||||
params.set('format', this.format)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user