diff --git a/invokeai/frontend/web/src/services/api/thunks/image.ts b/invokeai/frontend/web/src/services/api/thunks/image.ts index 71eedb0327..cb79111d5e 100644 --- a/invokeai/frontend/web/src/services/api/thunks/image.ts +++ b/invokeai/frontend/web/src/services/api/thunks/image.ts @@ -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'];