-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
We've been using this package successfully for our Azure Functions using v3 programming model (with function.json files).
When we started our migration to v4 programming model we discovered that the parsing of multipart form data fails due to Exception: Missing Content-Type, even if headers from the request are identical as before.
Whats seems have changed is that @azure/functions package use a different definition of HttpRequest in version 4.
At the moment we are using the following workaround, but it would be preferable with support in @anzp/azure-function-multipart package:
const headers = {}
for (const [key, value] of request.headers.entries()) {
headers[key] = value
}
const { files, fields } = await parseMultipartFormData(
{ ...request, body: Buffer.from(await request.arrayBuffer()) },
{ headers }
)sdymj84, klucero-awto, MickeyP2K, samuelms1, crizzs and 7 moreSmerlyn-Javier, yevhen-liakhov and LucasBonafe
Metadata
Metadata
Assignees
Labels
No labels