From 664c58e863c8c5a166daf240d851626d03f31421 Mon Sep 17 00:00:00 2001 From: waltem01 Date: Thu, 15 Feb 2024 08:13:44 +0100 Subject: [PATCH] prepare image upload steps --- Webserver/src/routes/image/+page.svelte | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Webserver/src/routes/image/+page.svelte b/Webserver/src/routes/image/+page.svelte index 29095a0..0a4717a 100644 --- a/Webserver/src/routes/image/+page.svelte +++ b/Webserver/src/routes/image/+page.svelte @@ -9,7 +9,9 @@ let imageURL: string, uploadData: UploadData; - async function loadImage(url: string) {} + async function sendImage(data: ImageData) {} + + async function loadImage(url: string): Promise {} function uploadImage(event: Event) {} @@ -18,11 +20,16 @@ {#if imageURL} User uploaded {#await loadImage(imageURL)} -

Loading image . . .

+

Loading image data . . .

{uploadData.elapsed} seconds elapsed.

- {:then imageData} -

Done!

-

{uploadData.elapsed} seconds elapsed.

- {clearInterval(uploadData.interval)} + {:then data} + {#await sendImage(data)} +

Uploading image data . . .

+

{uploadData.elapsed} seconds elapsed.

+ {:then} +

Done!

+

{uploadData.elapsed} seconds elapsed.

+ {clearInterval(uploadData.interval)} + {/await} {/await} {/if}