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 Automate / convert image format iPad
Power Automate
Unanswered

convert image format iPad

(1) ShareShare
ReportReport
Posted on by

Hi Guys,

i am using the Camera control to capture a picture that i want to upload to sharepoint via power automate flow.

I am stuck at converting the format to binary so the flow works...

 
I have:
ClearCollect(colPhoto, Camera1.Photo)

when I print  First(colPhoto).Value

on the ipad air 5 i get:
/SessionStorage/841ED2CA-E651-402F-972F-4F81B8DC0F4B.jpeg
 
for the browser (edge) capture i get:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAIABJREFUeF6kvWmzZcl1HZb3vfvmGl5NXVU9sEdMBAnQGmxJNElZZtikbOmrZcp2hKwIO/wnFPoi2vpkfXDYDjuCsmQrLFshWUFRks0IwiQBAgQBEkADaICNHtCoHqqrqmt+83Ada629MvfJe241ZL2I7vfqDufkydy599prDzn563/tP5+dnp6W6fK0r [...]  (like a million characters long)

 

so there is definitely a mismatch in formats here.. i tried the dataUriToBinary function and base64ToBinary but none of them work, i always get 

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'dataUriToBinary' expects its parameter to be formatted as a valid data URI. The provided value '/SessionStorage/5C573612-E4EE-4C0E-830C-9703DDB10BD3.jpeg' was not formatted correctly.

 

It works on browser, just not on the ipad

Any help would be much apprechiated, thank you!

Unbenannt.png
Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    @SteveDaPirate - Maybe just use the expression below -

     

    • base64ToBinary(replace('<yourimagevaraible>''data&colon;image/jpeg;base64,'''))

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • SteveDaPirate Profile Picture
    on at

    @CFernandes 

    Hi, thanks for the answer, just so that i understand it correctly - for my case it would be this?

    base64ToBinary(replace('Createfile_FileContent',  'data&colon;image/jpeg;base64,'''))
     
    i get this error now
    Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'.
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    @SteveDaPirate 

    • This is what I think should work... Hardcoded the binary string

     

    base64ToBinary(replace('data&colon;image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwA AAABJRU5ErkJggg==''data&colon;image/jpeg;base64,'''))

    • CFernandes_0-1720530709407.png

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • SteveDaPirate Profile Picture
    on at

    @CFernandes i think there is a little misunderstanding here - in browser i get the base64 data directly and there the converting with base64ToBinary works, that is no problem.

    just on the ipad, the photo is saved as "/SessionStorage/841ED2CA-E651-402F-972F-4F81B8DC0F4B.jpeg" - insert that as your variable and it also doesnt work -

    i need to convert that variable to base64/ binary so that i can use it. do you know about any function in that regard?

  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    @SteveDaPirate - Lets step a little back, so you get "/SessionStorage/841ED2CA-E651-402F-972F-4F81B8DC0F4B.jpeg" in the variable? rather than base64 or dataURI?

  • SteveDaPirate Profile Picture
    on at

    @CFernandes yes! when i take a picture with the ipad

  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    @SteveDaPirate - So in PowerApps you are using JSON function and then passing variable in PowerAutomate?

     

    • Set(myVar; JSON(Image; IncludeBinaryData))

     

  • SteveDaPirate Profile Picture
    on at

    @CFernandes currently i am saving the camera data in power apps as 

    ClearCollect(colPhoto, Camera1.Photo)
    and then i call the flow with this as Photo variable:
    First(colPhoto).Value
    in the flow i used (see screenshot attached)
    base64ToBinary(triggerBody()['Createfile_FileContent']) 
     
    i now tried collecting with the json function that you mentioned,
    ClearCollect(colPhoto, JSON(Camera1.Photo; JSONFormat.IncludeBinaryData))
    that gives me "B" as variable value ^^
    Screenshot 2024-07-09 171052.png
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    @SteveDaPirate - Hey Mate, I am travelling and could not reproduce the problem. I will check this tomorrow and get back you.

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 Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard