This commit is contained in:
Yury Semikhatsky 2024-03-25 11:32:44 -07:00
parent 598407280c
commit fd58727d27
2 changed files with 2 additions and 3 deletions

View file

@ -189,9 +189,8 @@ export class APIRequestContext extends ChannelOwner<channels.APIRequestContextCh
// Convert file-like values to ServerFilePayload structs.
for (const [name, value] of Object.entries(options.multipart)) {
if (Array.isArray(value)) {
for (const item of value) {
for (const item of value)
multipartData.push(await toFormField(name, item));
}
} else {
multipartData.push(await toFormField(name, value));
}

View file

@ -992,7 +992,7 @@ it('should support repeating names in multipart/form-data', async function({ con
'content-type': 'text/plain',
});
res.end('OK.');
});
});
});
const [postBody, response] = await Promise.all([
postBodyPromise,