web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding Image with Came...
Power Apps
Unanswered

Adding Image with Camera to SharePoint LIB via Add Picture control is missing Preview Image

(0) ShareShare
ReportReport
Posted on by 255

Hi,

 

I made a Canvas App with Add Picture control. I upload files to Documents Library (since my Image Lib wasn't listed when making the connection from PowerApps). I want to particularly use Add Picture control.

 

Everything is working fine with the Camera and the images come to SharePoint Library but when clicking them in the Lib there's a notion: "This image seems not to have a preview image. Download the file."

 

What should I do?

 

On Add Picture control there are default settings: nothing changed. Even UseMobileCamera is false.

 

On Upload Button I have:

OnSelect:

UploadaphototoSharePointfromPowerApps.Run(AddMediaButton1.FileName,JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData))

 

I use flow to add the image to the library.

 

Any help would be appreciated.

I don't want to change my main method of using camera.

 

 

 

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,042 Most Valuable Professional on at

    Hi @Finnair ,

    I have a blog showing a number of options for adding and viewing images in SharePoint. Happy to assist if one suits your needs.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Finnair Profile Picture
    255 on at

    My problem is viewing them in SharePoint.

  • WarrenBelz Profile Picture
    153,042 Most Valuable Professional on at

    @Finnair ,

    The blog covers this and gives a list of options available. What are you currently using as the Image property of the Image Control you are wanting to view the preview in. Also is this a mobile device or a PC?

  • Finnair Profile Picture
    255 on at

    @WarrenBelz 

     

    Thanks. But my problem is more complicated:

     

    -If I take a picture with CAMERA in my App > That goes to SharePoint Lib and if I click the file link in the LIB I got notion: "This image seems not to have a Preview image > Download".

    -If I UPLOAD the picture in my App with Upload function and I go to the SharePoint LIB, I can open the image by clicking.

     

    In my App's Gallery Control the Image property is:

    ThisItem.'{Thumbnail}'.Large

     

    So, what's the matter with CAMERA FUNCTION inside Add Picture Control, that it doesn't render a Preview Image inside the SharePoint Library?

     

     

     

     

     

  • WarrenBelz Profile Picture
    153,042 Most Valuable Professional on at

    Hi @Finnair ,

    The camera control stores the image in a format called dataUri - there is a section at the start of the blog on how to store this. You do not need JSON conversion - just a dataUriToBinary conversion in the Flow. 

  • Finnair Profile Picture
    255 on at

    Thanks @WarrenBelz 

     

    But, I don't have a Camera control but only Add Picture control. That might be the problem: I use Add Picture Control for both 1) Taking the pic with camera 2) Just uploading the pic from phone gallery.

     

    🙂

     

     

     

     

  • WarrenBelz Profile Picture
    153,042 Most Valuable Professional on at

    @Finnair ,

    Sorry, but I am a little confused here - in your previous post you said: -

    -If I take a picture with CAMERA in my App > That goes to SharePoint Lib and if I click the file link in the LIB I got notion: "This image seems not to have a Preview image > Download".

    -If I UPLOAD the picture in my App with Upload function and I go to the SharePoint LIB, I can open the image by clicking.

    I responded with what I thought was the issue of saving the camera control photo. How are you taking and storing the two types of photos?

    One of my prod apps takes about 15,000 photos of both types per year on iPads and then both types are viewed in the same SharePoint Library as below.

     

    ThumbnailLarge.png

    The process for both is set out in the blog (Camera Image is here). Are you doing something different?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Finnair Profile Picture
    255 on at

    Sorry the confusion @WarrenBelz . In my first message I said I use Add Picture control. When I talk about Camera, I mean Camera possibility inside Add picture control.

     

    And that seems to be the problem: Add picture control produces two kind of images based on whether Upload from Phone Gallery or Take a photo with camera is used.

  • WarrenBelz Profile Picture
    153,042 Most Valuable Professional on at

    Hi @Finnair ,

    Providing you are uploading a JPG file, they should be the same (as that is the format most phone cameras store the image in). Are you uploading something else?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Finnair Profile Picture
    255 on at

    @WarrenBelz  

    Yes they are both JPG:s.

    So, both comes as a pic file icon in the Library. But when clicking the pic icon produced by the camera function, the preview image is missing, and only download is suggested.

     

    It's a bit frustrating since everything is otherwise working well 🙂

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard