Camera vs Add Picture

Within PowerApps there are a number of controls that handle images.

Image and Camera control in Power Apps

Using these controls I created an app that gives the user the options to upload a picture using the Add Picture control or take a picture using the camera control.

Image and Camera controls in a Power App

Then using 2 Image controls I’m copying the image form the camera with the expression:

Camera1.Photo

and the image control for the uploaded photo is set to:

UploadedImage1.Image

All is looking good and I’m happy that I’m able to set the image control to the images uploaded and taken by my camera. However I tried to send these images to Flow and then I noticed something weird. The Camera sends the actual image binary data to the Image control where the upload photo does not. The upload photo gives me a url alike text.

To proof my point I added two labels to my screen. Each of these would display Image1 or Image2 and shown below you can see the difference:

Content of an image and the content of a camera control

This is not good! The image control seems to be happy with either format of the image, but my Flow is not!

When I looked around in the PowerApps community I found my friend, Paul Culmsee’s post, about taking picture with a camera and sending them to Flow, but I haven’t managed to find a post about the add picture control doing the same.

So far I’ve not found a solutions for receiving the uploaded image in Flow. So far the best solution that I’ve found comes from John Liu, but fiddling with triggers is not something that should be needed.

There is however a reasonable way around the problem. The Attachments control will let you upload files.

Attachments control

This Attachments control is opening doors as I can now create a form with my attachment control and a submit the images as an attachment. Ok, it is not as pretty as the add a picture control, but at least it will work. Ok, you migth not end up with the binary data going to SharePoint, but you can get the URL of the attachment which a flow can extract for you.

 

 

 

 

By Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

2 thoughts on “PowerApps – Camera vs Add Picture and get your images to your Flow”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.