aboutsummaryrefslogtreecommitdiff
path: root/src/client/Network.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Network.ts')
-rw-r--r--src/client/Network.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/Network.ts b/src/client/Network.ts
index b11dcb379..850ab4f91 100644
--- a/src/client/Network.ts
+++ b/src/client/Network.ts
@@ -27,6 +27,19 @@ export namespace Networking {
return response.text().then(text => ({ error: '' + response.status + ':' + response.statusText + '-' + text }));
});
}
+ export async function PostFormToServer(prompt: string, source: Blob, mask: Blob, width: number, height: number) {
+ const formData = new FormData();
+ formData.set('prompt', prompt);
+ formData.set('source', source);
+ formData.set('mask', mask);
+ formData.set('width', width.toString());
+ formData.set('height', height.toString());
+ const parameters = {
+ method: 'POST',
+ body: formData,
+ };
+ return fetch('/queryFireflyImageFillWithMask', parameters);
+ }
/**
* FileGuidPair attaches a guid to a file that is being uploaded,