mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-11-14 00:43:50 +00:00
place image onto canvas
This commit is contained in:
parent
c9507ed683
commit
6a2e1f48f9
@ -10,6 +10,13 @@
|
||||
let imageURL: string | null, lastImage: File;
|
||||
let uploadData: UploadData;
|
||||
|
||||
async function placeImage() {
|
||||
const fdata = new FormData();
|
||||
fdata.append('x', '0');
|
||||
fdata.append('y', '0');
|
||||
await post(fdata, 'image');
|
||||
}
|
||||
|
||||
async function sendImage(url: string) {
|
||||
const fdata = new FormData();
|
||||
fdata.append('url', url);
|
||||
@ -98,8 +105,13 @@
|
||||
<p>Sending image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{#await placeImage()}
|
||||
<p>Placing image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{/await}
|
||||
{/await}
|
||||
{/await}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user