Skip to content

Commit 7932c2f

Browse files
committed
Fix File encoding
1 parent 664af1e commit 7932c2f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/start/src/server/server-runtime.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@ function getHeadersAndBody(body: any): {
5555
},
5656
body,
5757
};
58-
case body instanceof Blob:
59-
return {
60-
headers: {
61-
[BODY_FORMAT_KEY]: BodyFormat.Blob,
62-
},
63-
body,
64-
};
6558
case body instanceof File: {
6659
const formData = new FormData();
6760
formData.append(BODY_FORMAL_FILE, body, body.name);
6861
return {
6962
headers: {
7063
[BODY_FORMAT_KEY]: BodyFormat.File,
7164
},
72-
body: new FormData(),
65+
body: formData,
7366
};
7467
}
68+
case body instanceof Blob:
69+
return {
70+
headers: {
71+
[BODY_FORMAT_KEY]: BodyFormat.Blob,
72+
},
73+
body,
74+
};
7575
case body instanceof ArrayBuffer:
7676
return {
7777
headers: {

0 commit comments

Comments
 (0)