mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 12:01:45 +00:00
upload start flag
This commit is contained in:
parent
9ab5ceaa88
commit
5248c09267
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
let imageURL: string | null, lastImage: File;
|
let imageURL: string | null, lastImage: File;
|
||||||
let uploadData: UploadData, matrix: Matrix;
|
let uploadData: UploadData, matrix: Matrix;
|
||||||
|
let uploadStarted = false;
|
||||||
|
|
||||||
async function updateMatrix() {
|
async function updateMatrix() {
|
||||||
await fetch('/api/redirect?endpoint=update');
|
await fetch('/api/redirect?endpoint=update');
|
||||||
@ -117,6 +118,7 @@
|
|||||||
<input type="file" name="image" accept="image/*" on:change={uploadImage} />
|
<input type="file" name="image" accept="image/*" on:change={uploadImage} />
|
||||||
{#if imageURL}
|
{#if imageURL}
|
||||||
<img src={imageURL} alt="User uploaded" />
|
<img src={imageURL} alt="User uploaded" />
|
||||||
|
{#if uploadStarted}
|
||||||
{#await fileAsDataURL(lastImage, matrix.width, matrix.height)}
|
{#await fileAsDataURL(lastImage, matrix.width, matrix.height)}
|
||||||
<p>Loading image data . . .</p>
|
<p>Loading image data . . .</p>
|
||||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
@ -140,3 +142,4 @@
|
|||||||
{/await}
|
{/await}
|
||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user