mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 12:01:45 +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 imageURL: string | null, lastImage: File;
|
||||||
let uploadData: UploadData;
|
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) {
|
async function sendImage(url: string) {
|
||||||
const fdata = new FormData();
|
const fdata = new FormData();
|
||||||
fdata.append('url', url);
|
fdata.append('url', url);
|
||||||
@ -97,9 +104,14 @@
|
|||||||
{#await sendImage(dataUrl)}
|
{#await sendImage(dataUrl)}
|
||||||
<p>Sending image . . .</p>
|
<p>Sending image . . .</p>
|
||||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
|
{:then}
|
||||||
|
{#await placeImage()}
|
||||||
|
<p>Placing image . . .</p>
|
||||||
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
{:then}
|
{:then}
|
||||||
<p>Done!</p>
|
<p>Done!</p>
|
||||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||||
{/await}
|
{/await}
|
||||||
{/await}
|
{/await}
|
||||||
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user