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 /> {/if} diff --git a/frontend/src/lib/components/S3ObjectPicker.svelte b/frontend/src/lib/components/S3ObjectPicker.svelte index bfa185d776..ca1a8f7614 100644 --- a/frontend/src/lib/components/S3ObjectPicker.svelte +++ b/frontend/src/lib/components/S3ObjectPicker.svelte @@ -60,7 +60,7 @@ on:focus={(e) => { dispatch('focus') }} - code={JSON.stringify({ s3: '' }, null, 2)} + code={JSON.stringify(value ?? { s3: '' }, null, 2)} bind:value /> {/if} diff --git a/frontend/src/lib/components/common/fileInput/FileInput.svelte b/frontend/src/lib/components/common/fileInput/FileInput.svelte index cd9fe6e76e..5e98e34445 100644 --- a/frontend/src/lib/components/common/fileInput/FileInput.svelte +++ b/frontend/src/lib/components/common/fileInput/FileInput.svelte @@ -17,6 +17,8 @@ export let iconSize = 36 export let returnFileNames = false export let submittedText: string | undefined = undefined + export let defaultFile: string | undefined = undefined + const dispatch = createEventDispatcher() let input: HTMLInputElement let files: File[] | undefined = undefined @@ -156,4 +158,10 @@ {multiple} {...$$restProps} /> + + {#if defaultFile} +