Multipart/form-data processing via HttpTrigger using NodeJS Azure functions

In this guide , I will show you how to process multipart form data via HttpTrigger in a NodeJS Azure Function.

Now lets create the function in the portal.

Once the function is created , go the plateform features and click (Advanced Tools) Kudu

Advanced Tools Kudu

Once in Kudu , Click Debug Console and Run CMD

Lanch CMD

Goto the Azurefunction folder in this case HttpTrigger1, create a package.json file by either running npm init and then copying the code below.

and then copying the code below to seperate files (function.js, index.js and package.json)

Run npm install and you are ready to test your function

Go to the Azure function and copy the URL

Click Get function URL

now you are ready to test it , download and open PostMan and paste the URL

Choose form-data and add file type , attach the test file

now you will receive the size of the file , file name and content type.

Leave a Comment