mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix image upload issue
This commit is contained in:
parent
bd9786564c
commit
8a3072db1a
2
invokeai/frontend/web/dist/index.html
vendored
2
invokeai/frontend/web/dist/index.html
vendored
@ -12,7 +12,7 @@
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="./assets/index-12a7dbbd.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-f05723f9.js"></script>
|
||||
</head>
|
||||
|
||||
<body dir="ltr">
|
||||
|
@ -157,8 +157,6 @@ export const imageUploaded = createAppAsyncThunk<
|
||||
session_id,
|
||||
} = arg;
|
||||
const { post } = $client.get();
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const { data, error, response } = await post('/api/v1/images/', {
|
||||
params: {
|
||||
query: {
|
||||
@ -167,8 +165,12 @@ export const imageUploaded = createAppAsyncThunk<
|
||||
session_id,
|
||||
},
|
||||
},
|
||||
// @ts-ignore
|
||||
body: formData
|
||||
body: { file },
|
||||
bodySerializer: (body) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', body.file);
|
||||
return formData;
|
||||
},
|
||||
});
|
||||
|
||||
if (error) {
|
||||
@ -215,7 +217,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