Skip to content

Commit 67f743e

Browse files
committed
Use Component.blob since file method is deprecated
1 parent f0083f5 commit 67f743e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Multipart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class Multipart implements Part {
244244
for (const [key, value] of formData.entries()) {
245245
if (typeof value === "string") parts.push(new Component({"Content-Disposition": `form-data; name="${key}"`}, new TextEncoder().encode(value)));
246246
else {
247-
const part = await Component.file(value);
247+
const part = await Component.blob(value);
248248
part.headers.set("Content-Disposition", `form-data; name="${key}"; filename="${value.name}"`);
249249
parts.push(part);
250250
}

0 commit comments

Comments
 (0)