Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Upload a File to SharePoint from HTML File Upload

I am trying to call an HTTP triggered Flow from JavaScript to upload a file into SharePoint. In my HTML page I have a file input control, like this:

<input type="file" id="fileId" name="filename">




What should I pass for the FileContent parameter here from JavaScript?

Thank you.

Solution Sage
Solution Sage

Hi @SachV ,


You can use the base64ToBinary() to upload a file from base64.


Please refer to this link here for more info including encoding to base64.


If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,116)