{#snippet fileItem(file: VertFile, index: number)} {@const isAudio = file.converter?.name === "ffmpeg"} {@const isVideo = file.converter?.name === "vertd"}
{#if !file.converter} {:else if isAudio} {:else if isVideo} {:else} {/if}
{#if file.processing} {:else}

{file.name}

{/if}
{#if !file.converter} {#if file.name.startsWith("vertd")}

We can't convert this file.

what are you doing..? you're supposed to run the vertd server!

{:else}

We can't convert this file.

Only image, video, and audio files are supported

{/if} {:else if isVideo && !$vertdLoaded}

We can't convert this file.

Could not find the vertd instance to start video conversion. Are you sure the instance URL is set correctly?

{:else}
{#if file.blobUrl} {file.name} {:else}
{#if isAudio} {:else if isVideo} {:else} {/if}
{/if}
file.result && (file.result = null)} />
{/if}
{/snippet}
{#each files.files as file, i (file.id)} {#if files.files.length >= 2 && i === 1} {/if} {@render fileItem(file, i)} {#if files.files.length < 2} {/if} {/each} {#if files.files.length === 0} {/if}