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

Upload Image to Sharepoint using native camera

I am trying to upload an image to a sharepoint library using the "Add Picture" utility. 

 

This worked for me in another PowerApp using SQL DB, but i cant seem to get it to work using Sharepoint. 

 

I attempted to use the dataUriToBinary method, but received the attached error in my flow. 

 
File Content in Flow: dataUriToBinary(triggerBody()['Createfile_FileContent'])
OnClick: ExpenseImageSent.Run(UploadedImage2.Image)
 

Is there a way for this to be done? I need to use the Add Picture utility so users can take pictures with their native camera, as well as upload images from their device. 

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @nvrhughes ,

I have done a blog on this that should cover your query. Happy to elaborate further after you have read this.

 

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.

I see that you are writing to a multiline text field in a Sharepoint list. Will I be able to populate a gallery from this sharepoint list containing my images once uploaded? For example, if the user needs to edit or change the photo later down the road, can i display what is in the list in my app? Or do i need to add these to a Sharepoint library? @WarrenBelz 

@nvrhughes ,

There are several options in the blog including a library and attachments.

The multi line text field is good for “static” photos when you only want to view them in Power Apps as it saves the need for another library. You can also view attachments as noted. There is no provision to “edit “ photos ( the changed one would need to be re-uploaded and saved).

If you write to multi line text and want to put it into a library, it would need to be converted (base64ToBinary) with a Flow to convert to a photo.

 

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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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
Users online (2,504)