mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
get uploads working again
This commit is contained in:
parent
d368a1de0c
commit
fbac11a521
@ -156,7 +156,10 @@ export const imageUploaded = createAppAsyncThunk<
|
||||
is_intermediate,
|
||||
session_id,
|
||||
} = arg;
|
||||
console.log({ file })
|
||||
const { post } = $client.get();
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const { data, error, response } = await post('/api/v1/images/', {
|
||||
params: {
|
||||
query: {
|
||||
@ -165,12 +168,8 @@ export const imageUploaded = createAppAsyncThunk<
|
||||
session_id,
|
||||
},
|
||||
},
|
||||
body: { file },
|
||||
bodySerializer: (body) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', body.file);
|
||||
return formData;
|
||||
},
|
||||
// @ts-ignore
|
||||
body: formData
|
||||
});
|
||||
|
||||
if (error) {
|
||||
@ -217,7 +216,7 @@ export const imageDeleted = createAppAsyncThunk<
|
||||
|
||||
type UpdateImageArg =
|
||||
paths['/api/v1/images/{image_name}']['patch']['requestBody']['content']['application/json'] &
|
||||
paths['/api/v1/images/{image_name}']['patch']['parameters']['path'];
|
||||
paths['/api/v1/images/{image_name}']['patch']['parameters']['path'];
|
||||
|
||||
type UpdateImageResponse =
|
||||
paths['/api/v1/images/{image_name}']['patch']['responses']['200']['content']['application/json'];
|
||||
|
Loading…
Reference in New Issue
Block a user