mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51: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;
|
||||
|
||||
async function loadImage(url: string) {}
|
||||
async function sendImage(data: ImageData) {}
|
||||
|
||||
async function loadImage(url: string): Promise<ImageData> {}
|
||||
|
||||
function uploadImage(event: Event) {}
|
||||
</script>
|
||||
@ -18,11 +20,16 @@
|
||||
{#if imageURL}
|
||||
<img src={imageURL} alt="User uploaded" />
|
||||
{#await loadImage(imageURL)}
|
||||
<p>Loading image . . .</p>
|
||||
<p>Loading image data . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then imageData}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{clearInterval(uploadData.interval)}
|
||||
{:then data}
|
||||
{#await sendImage(data)}
|
||||
<p>Uploading image data . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{clearInterval(uploadData.interval)}
|
||||
{/await}
|
||||
{/await}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user