anzharip/azure-function-multipart

parseMultipartFormData() type error

Skateboards opened this issue · 2 comments

Getting the following error now when I try to pass only the request object from my Azure Function to parseMultipartFormData():

Argument of type 'HttpRequest' is not assignable to parameter of type 'HttpRequest & { headers: { "content-type": string; }; }'.
Type 'HttpRequest' is not assignable to type '{ headers: { "content-type": string; }; }'.
Types of property 'headers' are incompatible.
Property '"content-type"' is missing in type 'HttpRequestHeaders' but required in type '{ "content-type": string; }'.

const { fields, files } = await parseMultipartFormData(req);

HI @Skateboards! My bad, I was updating the typing according to busboy's update, but introduced an error. It should be fixed in the latest update. Do you mind if you verify it? Thanks!

Closed for inactivity