mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 12:01:45 +00:00
prepare image upload steps
This commit is contained in:
parent
d75b74965b
commit
664c58e863
@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
let imageURL: string, uploadData: UploadData;
|
let imageURL: string, uploadData: UploadData;
|
||||||
|
|
||||||
async function loadImage(url: string) {}
|
async function sendImage(data: ImageData) {}
|
||||||
|
|
||||||
|
async function loadImage(url: string): Promise<ImageData> {}
|
||||||
|
|
||||||
function uploadImage(event: Event) {}
|
function uploadImage(event: Event) {}
|
||||||
</script>
|
</script>
|
||||||
@ -18,11 +20,16 @@
|
|||||||
{#if imageURL}
|
{#if imageURL}
|
||||||
<img src={imageURL} alt="User uploaded" />
|
<img src={imageURL} alt="User uploaded" />
|
||||||
{#await loadImage(imageURL)}
|
{#await loadImage(imageURL)}
|
||||||
<p>Loading image . . .</p>
|
<p>Loading image data . . .</p>
|
||||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
{:then imageData}
|
{:then data}
|
||||||
<p>Done!</p>
|
{#await sendImage(data)}
|
||||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
<p>Uploading image data . . .</p>
|
||||||
{clearInterval(uploadData.interval)}
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
|
{:then}
|
||||||
|
<p>Done!</p>
|
||||||
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
|
{clearInterval(uploadData.interval)}
|
||||||
|
{/await}
|
||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user