get uploads working again

This commit is contained in:
Mary Hipp 2023-07-07 12:02:22 -04:00
parent d368a1de0c
commit fbac11a521

View File

@ -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'];