upload start flag

This commit is contained in:
waltem01 2024-02-16 11:27:26 +01:00
parent 9ab5ceaa88
commit 5248c09267

View File

@ -17,6 +17,7 @@
let imageURL: string | null, lastImage: File;
let uploadData: UploadData, matrix: Matrix;
let uploadStarted = false;
async function updateMatrix() {
await fetch('/api/redirect?endpoint=update');
@ -117,6 +118,7 @@
<input type="file" name="image" accept="image/*" on:change={uploadImage} />
{#if imageURL}
<img src={imageURL} alt="User uploaded" />
{#if uploadStarted}
{#await fileAsDataURL(lastImage, matrix.width, matrix.height)}
<p>Loading image data . . .</p>
<p>{uploadData.elapsed} seconds elapsed.</p>
@ -139,4 +141,5 @@
{/await}
{/await}
{/await}
{/if}
{/if}