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 Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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