diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 0ee02246c5..2380b250de 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -489,7 +489,7 @@ on:focus={(e) => { dispatch('focus') }} - code={JSON.stringify({ s3: '' }, null, 2)} + code={JSON.stringify(value ?? defaultValue ?? { s3: '' }, null, 2)} bind:value /> diff --git a/frontend/src/lib/components/common/fileUpload/FileUpload.svelte b/frontend/src/lib/components/common/fileUpload/FileUpload.svelte index 29c518b6ac..a944937eea 100644 --- a/frontend/src/lib/components/common/fileUpload/FileUpload.svelte +++ b/frontend/src/lib/components/common/fileUpload/FileUpload.svelte @@ -21,6 +21,7 @@ export let randomFileKey: boolean = false export let pathTransformer: any = undefined // function taking as input {file: File} and returning a string export let forceDisplayUploads: boolean = false + export let defaultValue: string | undefined = undefined const dispatch = createEventDispatcher() @@ -174,7 +175,7 @@ } -
+
{#if $fileUploads.length > 0 && !forceDisplayUploads}
@@ -362,6 +363,7 @@ }} class={twMerge('w-full h-full', customClass, 'wm-file-input')} style={customStyle} + defaultFile={defaultValue} > {containerText}