mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 09:00:16 +00:00
[Refactor] Rework userFileStore to match existing API on ComfyWorkflow (#1394)
* nit * Move load * nit * nit * Update store API * nit * nit * Move api * nit * Update tests * Add docs * Add temp user file * Implement save as * Test saveAs
This commit is contained in:
@@ -602,10 +602,16 @@ class ComfyApi extends EventTarget {
|
||||
overwrite?: boolean
|
||||
stringify?: boolean
|
||||
throwOnError?: boolean
|
||||
} = { overwrite: true, stringify: true, throwOnError: true }
|
||||
full_info?: boolean
|
||||
} = {
|
||||
overwrite: true,
|
||||
stringify: true,
|
||||
throwOnError: true,
|
||||
full_info: false
|
||||
}
|
||||
): Promise<Response> {
|
||||
const resp = await this.fetchApi(
|
||||
`/userdata/${encodeURIComponent(file)}?overwrite=${options.overwrite}`,
|
||||
`/userdata/${encodeURIComponent(file)}?overwrite=${options.overwrite}&full_info=${options.full_info}`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: options?.stringify ? JSON.stringify(data) : data,
|
||||
|
||||
Reference in New Issue
Block a user