Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Upload audio files in powerapps



I have created an API to upload audio/ image files in BLOB storage using the article


I am able to upload audio as well as image files directly through this API. However, when I add the Custom API connection in my app and pass the audio file as param, it gives invalid argument error. The same code works for image type. Below is the sample code.


Capturing Audio:



API call to uplload audio



Let me know how can I achieve uploading audio files to AzureBlobStorage.


Thanks Vaishali

PowerApps Staff pratapladhani
PowerApps Staff

Re: Upload audio files in powerapps

Hi Vaishali, Sorry for the delay, you can use the similar API code for uploading Audio files (from the Microphone control). There is only one small change you need to implement for using the API with audio files vs image files.


In the AddFileParamTypes.cs file, replace the following line :

vendorExtensions = new Dictionary<string, object> { {"x-ms-media-kind", "image" } }

with this line instead :

vendorExtensions = new Dictionary<string, object> { {"x-ms-media-kind", "audio" } }


Do let me know if the solution works for you.

Pratap Ladhani,
Customer & Partner Success PM
Microsoft PowerApps and Microsoft Flow
Level: Powered On

Re: Upload audio files in powerapps

Please can I ask if you got this to work? I've been attempting the same thing. Similarly, my API will upload audio just fine via the Swagger UI. However, having modified the "vendorExtensions = new Dictionary<string, object> { {"x-ms-media-kind", "audio" } }" line per Pratap's post, calling the API in PowerApps and trying to pass audio from MyMicrophone.Audio is being seen as invalid.

Would be great if you had any tips.


Thank you!

Level: Power Up

Re: Upload audio files in powerapps

Any solution for this case? I traying too an upload of audio files to blob storage but without success, i give a "An error ocurred" as a response.

Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 194 members 6,357 guests
Please welcome our newest community members: