diff options
author | bobzel <zzzman@gmail.com> | 2025-08-04 09:56:12 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-08-04 09:56:12 -0400 |
commit | 8ec4e4fbd42be8ba6606d78da25c33f69d30ed63 (patch) | |
tree | c5bc08a54af8e76138cc4479604a8d911c6535fa /src/client/Network.ts | |
parent | 08d3b5c0208f8ec8e8c42a822c1793a30d107c3b (diff) |
switched to use firefly for image fill
Diffstat (limited to 'src/client/Network.ts')
-rw-r--r-- | src/client/Network.ts | 13 |
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, |