File tree Expand file tree Collapse file tree 9 files changed +16
-1
lines changed
client/src/gen/clients/axios
plugin-client/src/components Expand file tree Collapse file tree 9 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ title: Changelog
6
6
7
7
# 4.0.2
8
8
- [ ` plugin-zod ` ] ( /plugins/plugin-zod ) : Escape omit keys correctly with ` ' `
9
+ - [ ` plugin-client ` ] ( /plugins/plugin-client ) : Support stringify when using ` multipart/form-data `
9
10
10
11
# 4.0.1
11
12
- Upgrade internal packages
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export async function addFiles(
25
25
const value = requestData [ key as keyof typeof requestData ]
26
26
if ( typeof value === 'string' || ( value as unknown ) instanceof Blob ) {
27
27
formData . append ( key , value as unknown as string | Blob )
28
+ } else {
29
+ formData . append ( key , JSON . stringify ( value ) )
28
30
}
29
31
} )
30
32
}
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export async function addFilesHandler({ data }: { data: AddFilesMutationRequest
16
16
const value = requestData [ key as keyof typeof requestData ]
17
17
if ( typeof value === 'string' || ( value as unknown ) instanceof Blob ) {
18
18
formData . append ( key , value as unknown as string | Blob )
19
+ } else {
20
+ formData . append ( key , JSON . stringify ( value ) )
19
21
}
20
22
} )
21
23
}
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ export async function uploadFile(
37
37
const value = requestData [ key as keyof typeof requestData ]
38
38
if ( typeof value === 'string' || ( value as unknown ) instanceof Blob ) {
39
39
formData . append ( key , value as unknown as string | Blob )
40
+ } else {
41
+ formData . append ( key , JSON . stringify ( value ) )
40
42
}
41
43
} )
42
44
}
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ export async function uploadFileXML(
37
37
const value = requestData [ key as keyof typeof requestData ]
38
38
if ( typeof value === 'string' || ( value as unknown ) instanceof Blob ) {
39
39
formData . append ( key , value as unknown as string | Blob )
40
+ } else {
41
+ formData . append ( key , JSON . stringify ( value ) )
40
42
}
41
43
} )
42
44
}
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ export async function uploadFile(
31
31
const value = requestData [ key as keyof typeof requestData ]
32
32
if ( typeof value === 'string' || ( value as unknown ) instanceof Blob ) {
33
33
formData . append ( key , value as unknown as string | Blob )
34
+ } else {
35
+ formData . append ( key , JSON . stringify ( value ) )
34
36
}
35
37
} )
36
38
}
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export async function addFilesHandler({ data }: { data: AddFilesMutationRequest
16
16
const value = requestData [ key as keyof typeof requestData ]
17
17
if ( typeof value === 'string' || ( value as unknown ) instanceof Blob ) {
18
18
formData . append ( key , value as unknown as string | Blob )
19
+ } else {
20
+ formData . append ( key , JSON . stringify ( value ) )
19
21
}
20
22
} )
21
23
}
Original file line number Diff line number Diff line change 1
- export const hallo = 'world'
1
+ export const hallo = 'world'
Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ export function Client({
194
194
const value = requestData[key as keyof typeof requestData];
195
195
if (typeof value === 'string' || (value as unknown) instanceof Blob) {
196
196
formData.append(key, value as unknown as string | Blob);
197
+ } else {
198
+ formData.append(key, JSON.stringify(value));
197
199
}
198
200
})
199
201
}
You can’t perform that action at this time.
0 commit comments