File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
55import { useToastStore } from '@/platform/updates/common/toastStore'
66import type { ResultItemType } from '@/schemas/apiSchema'
77import { api } from '@/scripts/api'
8+ import { useAssetsStore } from '@/stores/assetsStore'
89
910const PASTED_IMAGE_EXPIRY_MS = 2000
1011
@@ -37,6 +38,13 @@ const uploadFile = async (
3738 }
3839
3940 const data = await resp . json ( )
41+
42+ // Update AssetsStore input assets when files are uploaded to input folder
43+ if ( formFields . type === 'input' || ( ! formFields . type && ! isPasted ) ) {
44+ const assetsStore = useAssetsStore ( )
45+ await assetsStore . updateInputs ( )
46+ }
47+
4048 return data . subfolder ? `${ data . subfolder } /${ data . name } ` : data . name
4149}
4250
You can’t perform that action at this time.
0 commit comments