cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CABIRD
Post Patron
Post Patron

dataUriToBinary fails

Objective

Power App uses Flow to forward images to One Drive for Business and or SharePoint library.  

Sadly the below appears to not function.

dataUriToBinary(triggerBody()['Createfile_FileContent'])

Image is uploaded but file is blank. Suggests the base 64 conversion fails.  

Viewed & read the following: (All fail)

A Filename Generation Example for PowerApps with Flow

PowerApps Flow Intro Upload an image to SharePoint using Flow

 Truly No-Code Solution for Saving Photos from PowerApps using Flow

An even more clever workaround for saving photos to SharePoint from PowerApps – using Microsoft Flow

Uploading Camera (Data URI) to SharePoint (Binary)

Pictures from powerapps to sharepoint back to powerapps using flow - not working     

dataUri save images to Sharepoint property 'Creafile_FileContent' doesn't exist PowerApps                                                                                                                   

2 ACCEPTED SOLUTIONS

Accepted Solutions
CABIRD
Post Patron
Post Patron

Pstork1
Dual Super User
Dual Super User

This is the exact same Blog article that I referenced in my response two days ago.  I find it interesting that the later response with just the web reference and no explanation gets accepted as the solution instead of the earlier response with an explanation and the same web reference.



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

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

If its an image file that is uploaded to PowerApps simply doing the DataUriToBinary won't work.  The problem is that images uploaded to PowerApps aren't actually in PowerApps as data.  Instead they are cached in the browser running PowerApps and the link to the Blob in the cache is given to PowerApps.  That's what you are passing to Flow.

If its an image taken by the camera then the data for the image is actually in the PowerApps.  That's when the dataUriToBinary will work.

 

The following is the best "hack" I know for working around the Blobmanager issue with uploaded pictures. It uses the outlook connector to retrieve the Blob and send it as data to the Flow.

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.
CABIRD
Post Patron
Post Patron

 
Pstork1
Dual Super User
Dual Super User

This is the exact same Blog article that I referenced in my response two days ago.  I find it interesting that the later response with just the web reference and no explanation gets accepted as the solution instead of the earlier response with an explanation and the same web reference.



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

Hello @Pstork1 

 

Apologise, the last few days have been personally challenging (relative with dementia) nevertheless no excuse. 

 

Thank you. 

Pstork1
Dual Super User
Dual Super User

Let me apologize too for venting.  The really important part is that you got the answer you needed.  I didn't actually notice until after I posted that it was the original questioner who posted the response and accepted it as the solution. If I had noticed I probably would have just let it go. I understand how tough it can be to deal with a relative with dementia. My dad died late last year at 105 after many years with short term memory loss dementia.



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

Hello @Pstork1 

 

105 a really good age. Dementia is certainly challenging ever day a little less like the person you once knew. Behavioural changes are the most difficult to manage as it becomes ever harder to rationalise with the person and no end in site. Even harder for the person suffering as sometimes they know. 

 

Thank you. 

Helpful resources

Announcements
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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,215)