It is possible to save images taken with a camera to SharePoint by saving the image's Url property to a "Multiple lines of text" type column in a SharePoint list. This works because the Url property contains the image data in base64 format, and you can see this if you display the Url property in a text box.
NB: This is not going to work in all environments, please see following discussion for details
Here is how to make a working app, screenshots below:
- Create a new list in SharePoint called "PowerAppsImages" and add a "Multiple line of text" column called "MyImageData"
- Create a new blank mobile PowerApp
- Connect PowerAppsImages as a data source
- Add a second screen (Screen2), and go back to Screen1 (the landing screen)
- In the landing screen create a camera control and set its OnSelect property to:
ClearCollect(LocalImage, Camera1.Photo); UpdateContext({PhotoDateTime: Now()}) - On the same screen create an image control and set its Image property to:
First(LocalImage).Url
- On the same screen create a text input and set its Default property to:
"Photo taken "& PhotoDateTime
- On the same screen create a button and set its Text property to "Save to SP" and its OnSelect property to:
Patch(PowerAppsImages, Defaults(PowerAppsImages), {Title: TextInput1.Text, MyImageData: First(LocalImage).Url}) - On the same screen, create a right arrow icon and set its OnSelect property to:
Navigate(Screen2, None)
- Now change to Screen2 and create a left arrow icon and set its OnSelect property to:
Back()
- On Screen2 add a refresh icon and set its OnSelect property to:
Refresh(PowerAppsImages)
This is needed because the delete button (to be added in subsequent steps) does not always refresh - On Screen2 add a text box and set its Text property to:
"Total count of images: "&CountRows(PowerAppsImages)
- On Screen 2 create a vertical custom gallery and set its Items property to:
PowerAppsImages
- In the gallery's template create a text box and set its Title property to:
ThisItem.Title
- In the gallery's template create an image control and set its Image property to:
ThisItem.MyImageData
- In the gallery's template create a trash can icon and set its OnSelect property to:
Remove(PowerAppsImages, ThisItem)
- Save and enjoy
I would be welcome for any feedback, particualrly if this does not work for someone.
PS You can turn all of the images into real jpg files by converting the base64 text to bytes with any online converter, just make sure you take only the text after the initial "data:image/jpeg;base64,"

