cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BPowerApps
Regular Visitor

Best Image upload to Sharepoint Solution

Would anyone be able to point me in the right direction for image upload from powerapps to a sharepoint library, preferably using the add media option?

 

Best I've found is here

PowerApps | Quickest Way Upload File Image to SharePoint - YouTube

which is a simpler version on Shane Youngs video, however the template referenced in this video and Shane Youngs doesn't seem to exist any and I can't seem to get my own working.

 

The goal is to have the user taking or uploading an existing image from their mobile phone.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @BPowerApps ,

 

If you want to customize the picture name, you can add another text input on the PowerApps trigger.

 

concat(triggerBody()['text_2'],'.',split(triggerBody()['text'],'.')[1])

 

vdezhilimsft_0-1670292609194.png

 

vdezhilimsft_1-1670292609194.png

 

vdezhilimsft_2-1670292609196.png
vdezhilimsft_4-1670293021809.png

 


Best Regards,

Dezhi

View solution in original post

7 REPLIES 7
v-dezhili-msft
Microsoft
Microsoft

Hi @BPowerApps ,

 

Do you want to save the pictures uploaded by Power apps to SharePoint?
I did a test and hope it helps you.

Power apps

 

 

 

getimagefile.Run(AddMediaButton2.FileName,JSON(UploadedImage2.Image,JSONFormat.IncludeBinaryData))

 

 

 

Power Automate:

 

 

 

{
  "$content-type":"@{split(split(triggerBody()['text_1'],';')[0],':')[1]}",
  "$content":"@{replace(split(triggerBody()['text_1'],',')[1],'"','')}"
}

 

 

 

vdezhilimsft_0-1669952819803.png

 

vdezhilimsft_1-1669952819806.png

 

vdezhilimsft_2-1669952819808.png
 
 

 

vdezhilimsft_2-1669953100449.png

 

 

Best Regards,

Dezhi

 

Thank you, I'm currently attempting this now. When creating the flow, how do you get the 'initialize variable' within the 'file content' section, within the create a file step? As well as this, is there a way to save the image with a specified name? Such as from a pre-populate text box within power apps?

Gorilla_8
Super User
Super User

Hi @BPowerApps 

This one is the best solution so far from @ravee_82 

Solved: Re: save uploaded pics to sharepoint from powerapp... - Power Platform Community (microsoft....

 

 

If I help or solved your problem, please accept as soluiton and give me kudos! Thanks

Thanks, however, I need the image to actually show as an image within Sharepoint. This solution just puts the JSON of an image into sharepoint which can let you view the image back in power apps within a gallery.

Gorilla_8
Super User
Super User

  There no way to save the image on Power Apps, he is not an datasource!

You can save from this solution and then get the image back and show with a gallery or media! 

 

 

If I help or solved your problem, please accept as soluiton and give me kudos! Thanks

 

@BPowerApps

This is not what I want. I want the mobile app user to add an image to power apps (which can be done with the add media option). Then click a button and the image gets uploaded to a Sharepoint document. I want the image viewable on sharepoint. The solution you linked does not do this. 

Hi @BPowerApps ,

 

If you want to customize the picture name, you can add another text input on the PowerApps trigger.

 

concat(triggerBody()['text_2'],'.',split(triggerBody()['text'],'.')[1])

 

vdezhilimsft_0-1670292609194.png

 

vdezhilimsft_1-1670292609194.png

 

vdezhilimsft_2-1670292609196.png
vdezhilimsft_4-1670293021809.png

 


Best Regards,

Dezhi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,015)