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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Upload Multiple Images...
Power Apps
Answered

Upload Multiple Images using Add Picture to Sharepoint Document Library

(0) ShareShare
ReportReport
Posted on by 4

 

Hi there,

 

I'm currently developing an app that allows users to upload photos to Sharepoint from either the Camera media control or the Add Picture control. The user needs to be able to upload multiple photos to a Sharepoint Document Library. I have achieved this with the Camera control using a gallery and Flow to upload the images. However, I ran into trouble with the Add Picture control.

 

The current process is:

 

  1. User selects image using Add Picture,
  2. User presses button "Button3" to collect the image to the collection "colPhotoImages",
  3. Repeat steps 1&2 depending on however many images there are,
  4. User presses button "Upload" which sends it off to Flow.

Button3:

Collect(colPhotoImages, AddMediaButton2.Media)

Upload:

// convert image to binary
Set(varJSON,With({wJSON:JSON(Image3.Image,JSONFormat.IncludeBinaryData)},With({wCommaPosition:Find(",",wJSON)},Mid(wJSON,wCommaPosition+1,Len(wJSON)-wCommaPosition-1))));
//run flow
NEW_Uploaded_to_Sharepoint.Run("",DepartmentDropdown_1.Selected.Value,varJSON);

Flow = NEW_Uploaded_to_Sharepoint.Run(Createfile_FileName,Createfile_FileName_1,Createfile_FileContent)

 

I found the JSON code from another guide on uploading images to Sharepoint, however this only uploads the first image added to the collection "colPhotoImages".

Example: If I add Picture1, Picture2 and Picture3 to the collection, it will only upload Picture1 to Sharepoint.

 

Flow:

chrome_Aqrn5nZ856.png

File Content = base64ToBinary(triggerBody()['Createfile_FileContent'])

 

Is it possible to set up some code to upload multiple images from an Add Picture control? I played around with ForAll(), but it doesn't allow me to use Set() to use the JSON code. Any help will be greatly appreciated.

 

Regards,

Jamie

Categories:
I have the same question (0)
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Jamiec23 This video from Reza should help you https://www.youtube.com/watch?v=5XsWgVnR7SU

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard