cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AraSaber12
Level 8

Upload Photo to PowerApps and then upload it to Sharepoint

Hi Guys,

 

I am struggeling with an issue which is took me a lot of time. I want to upload pictures from my phone to PowerApps and then upload it to Sharepoint. As you can see I am using Add picture function in PowerApps. and then I want through a flow upload the uploaded photo to sharepoint. This flow works perfctley when I take a picture from PowerApps camera. But when I use this for uploaded photo it does not work. In PowerApps I dont get any error but when I look to flow then I get this error.:

InvalidTemplate. Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '2076': 'The template language function 'dataUriToBinary' expects its parameter to be formatted as a valid data URI. The provided value 'appres://blobmanager/44d89ffa59234887b2510e2b4030f1ed/3' was not formatted correctly. Please see https://aka.ms/logicexpressions#dataUriToBinary for usage details.'.

 

The flow code that does not works: 

test7.Run(GUID()& ".jpg",UploadedImage1.Image,1)

The flow code that does works: 

test7.Run(GUID()& ".jpg",takenpicset6,Label5_1);

1.PNG

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Upload Photo to PowerApps and then upload it to Sharepoint

Hi @AraSaber12 

 

You should use the new JSON function in PowerApps to inlcude binary data and pass to Flow 

 

check this video

https://www.youtube.com/watch?v=5XsWgVnR7SU

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

3 REPLIES 3
Super User
Super User

Re: Upload Photo to PowerApps and then upload it to Sharepoint

Take a look at the following Blog article from John Liu.  It does a good job of explaining the problem and offering a solution.  There are other similar posts that offer different solutions but this is one of the best so far.

http://johnliu.net/blog/2019/4/flowninja-hack-87-lock-microsoft-flow-powerapps-trigger-to-upload-ima...



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
kheiman
Level: Powered On

Re: Upload Photo to PowerApps and then upload it to Sharepoint

I've been following John Liu's approaches on this also - but there's an even better way now due to some directly related changes in Powerapps. Check this one out as well. http://www.cleverworkarounds.com/2019/06/08/getting-pics-to-sharepoint-from-powerapps-is-getting-eas...

 

Although I don't think this solves the 'appres:blobmanager' local caching stuff where we can't seem to find a way to actually get at the content of these temporary blobs...

 

Try taking the Media from the AddPicture control and displaying it in a separate Image control - I just tried this and it worked for me - 

1. Use the Add Picture control to upload a file from my device - if I try to extract that 'media' i get the appres://blobmanager stuff.

2. Create an Image control and set it's Image property to my Add Picture control's .Media property. (the appres://blobmanager link)

 

Now the JSON function referenced in the link above used against the new image control displaying the uploaded content from the AddPicture control will give me actual base64 data not just the appres://blobmanager link.

 

Highlighted
Super User
Super User

Re: Upload Photo to PowerApps and then upload it to Sharepoint

Hi @AraSaber12 

 

You should use the new JSON function in PowerApps to inlcude binary data and pass to Flow 

 

check this video

https://www.youtube.com/watch?v=5XsWgVnR7SU

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 235 members 4,335 guests
Please welcome our newest community members: