We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c031599 commit e625bcaCopy full SHA for e625bca
src/Multipart.ts
@@ -184,7 +184,8 @@ export class Multipart implements Part {
184
const parts: Component[] = [];
185
186
for (const [key, value] of formData.entries()) {
187
- if (typeof value === "string") parts.push(new Component({"Content-Disposition": `form-data; name="${key}"`}, new TextEncoder().encode(value))); else {
+ if (typeof value === "string") parts.push(new Component({"Content-Disposition": `form-data; name="${key}"`}, new TextEncoder().encode(value)));
188
+ else {
189
const part = await Component.file(value);
190
part.headers.set("Content-Disposition", `form-data; name="${key}"; filename="${value.name}"`);
191
parts.push(part);
0 commit comments