Skip to content

Commit 8db35ea

Browse files
committed
*: expose entire multipart form response with .form()
1 parent fa37cd9 commit 8db35ea

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v2/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ export type Prodia = {
6868
// they will return the raw bytes for that output.
6969
arrayBuffer: () => Promise<ArrayBuffer>;
7070
uint8Array: () => Promise<Uint8Array>;
71+
72+
// get entire multipart form response
73+
form: () => Promise<FormData>;
7174
}>;
7275
};
7376

@@ -230,6 +233,7 @@ export const createProdia = ({
230233
new Uint8Array(
231234
await (body.get("output") as Blob).arrayBuffer(),
232235
),
236+
form: () => Promise.resolve(body),
233237
};
234238
};
235239

0 commit comments

Comments
 (0)