web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding bulk files to D...
Power Apps
Answered

Adding bulk files to Dataverse

(1) ShareShare
ReportReport
Posted on by 2
Hi Everyone,
Maybe I have fried my brain on caffeine. Here is my problem:
 
I want to open a dialog box to search files on a local drive.
Using the dialog box I want to select a single file or multiple files of different types (doc, pdf, xls, jpeg, etc)
I want to save the files in a dataverse table called "Jasonfiles"
In Jasonfiles there is a field called 'Document1' field type "File"
 
Me being the lazy programmer I am, I thought I would save a pile of time using the "Add Photo" control since it appeared to have everything I needed built in.
 
BUT...
If I add a "Add Photo" control called "AddMediaButton1" and use this control to select a file it appears all the file data is contained in the property "Media"
AND...
AddMediaButton1.Media is of type 'Text'
 
So does anyone know a easy way to convert AddMediaButton1.Media into a 'File" type to save into Document1?
 
Or for that matter does anyone have an easier solution to what I am trying to do?
 
Thanks
Jason
Categories:
I have the same question (0)
  • Verified answer
    vipuljain03 Profile Picture
    673 Super User 2026 Season 1 on at
    The "Add Media" control (in your case, its "AddMediaButton1") is primarily designed for images, and while it stores the media as base64-encoded text in the "Media" property, it can't be used directly to upload files into a Dataverse table. 
     
    You can leverage Power Automate flow to upload files using base64-encoded data from Power Apps.
     
    For File Picker, you can use a third-party PCF control for multi-file upload.
     
    Below is a sample Power Apps code, which you can reuse:
    Set(
       fileContentBase64,
       JSON(AddMediaButton1.Media, JSONFormat.IncludeBinaryData)
    );
    
    Set(
       fileName,
       AddMediaButton1.FileName
    );
    
    Set(
       fileType,
       AddMediaButton1.FileType
    );
    
    // Trigger Power Automate
    Set(
       response,
       PowerAutomateFlow.Run(fileContentBase64, fileName, fileType)
    );

    In Power Automate, you can use Dataverse connector to upload the file content into the "Jasonfiles" table.
     
    ----------------------------------------
     
    If this reply helped you, please mark this reply as suggested answer ✔️ and give it a like to help others in the community find the answer too!
     
    Thanks,
    Vipul
  • Suggested answer
    vipuljain03 Profile Picture
    673 Super User 2026 Season 1 on at
    Please click Accept as solution if my post helped you solve your issue. ✔️ This will help others find the solution to this problem. It also closes the item.

    If the content was useful in other ways, please consider giving it Thumbs Up. 👍

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard