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 III
Super User III

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

Welcome to the User Group Public Preview

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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 (3,816)