cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Santhosh72
Frequent Visitor

capture photo and save image locally

Hi,

 

Newbie needs help. Is it possible to create a powerapp to capture photo and save image to local folder.

 

Thanks

Santhosh

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Santhosh72 :

It is feasible to save pictures to a local folder, but it is a little complex.

I've made a test for your reference:

1\Add a camer control(Camera1)

2\Create a new flow(Downloadpic)

Action-Power Automate-Create a new flow

1.jpg

mark1:

 

dataUriToBinary(triggerBody()['Createfile_FileContent'])

 

3\Add the flow

Action-Power Automate-Downloadpic

4\Add a button

 

Download(Downloadpic.Run(Camera1.Photo).weburi)

 

2.JPG

Best Regards,

Bof

View solution in original post

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @Santhosh72 ,

Not to local folder - you can save to SharePoint Library, as item attachment or in a text field in a SharePoint List.

 

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.

Hi,

Is it possible to save to sharepoint without using flow?

Thanks

Hi @Santhosh72 ,

Yes, using JSON conversion and saving the Text in a SharePoint list multi-line Text field.
The code below is a syntax sample of how to get it there using an Image from an Image control

Set(
    vJSON,
    JSON(
        YourImageControlName.Image,
        IncludeBinaryData
    )
);
Set(
   vJSON64,
   Mid(
      vJSON,
      Find(
         ",",
         vJSON
      ) + 1,
      Len(vJSON) - 
      Find(
         ",",
         vJSON
      ) - 1
   )
);
Patch(
    YourListName,
    Defaults(YourListName),
    {
        YourLongTextFieldName: vJSON64,
        YourOtherField1: YourOtherControl1.xxx
        YourOtherField2; YourOtherControl2.xxx
    }
)

I have not used this for a while, but it should work.

 

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.

v-bofeng-msft
Community Support
Community Support

Hi @Santhosh72 :

It is feasible to save pictures to a local folder, but it is a little complex.

I've made a test for your reference:

1\Add a camer control(Camera1)

2\Create a new flow(Downloadpic)

Action-Power Automate-Create a new flow

1.jpg

mark1:

 

dataUriToBinary(triggerBody()['Createfile_FileContent'])

 

3\Add the flow

Action-Power Automate-Downloadpic

4\Add a button

 

Download(Downloadpic.Run(Camera1.Photo).weburi)

 

2.JPG

Best Regards,

Bof

View solution in original post

Thank you @v-bofeng-msft for the Flow alternative.

@Santhosh72 there are a number of ways of doing this on both app camera and uploaded photos if you want to use a Flow, however I was trying to answer the question you asked.

Hi @Santhosh72 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Top Solution Authors
Top Kudoed Authors
Users online (2,226)