8
votes

As the title says.. I'm building a power app that uploads an image to a sharepoint directory.

Following this blog I was able to successfully upload an image that was captured by a Camera Control.

However, I would like to do the same thing but with an 'Add Picture' Control.

My PowerApp function for doing this is

ClearCollect(PictureCollection2, AddMediaButton2.Media);
MediaToSharePoint.Run("test.png", First(PictureCollection2).Value)

I add the media to a collection, then Run a Flow with the value. This value is a form of a URL that contains the image stored as a blob. Here's an example of the value that gets passed to the Flow

blob:https://create.powerapps.com/79d7f767-4dff-448d-87ec-b3d2f7cdf27d

The flow has two steps; a PowerApp connector and a Share Point Create File

The flow is failing on the second step with a 'Bad Request' error.

Has anyone been able to upload an image to Sharepoint via an 'Add Picture' control?

Any help would be appreciated, let me know if there are any more details I should provide.

1
"Add Image" control has different format than captured images. The team is aware that no easy way to do this flow yet. You can go to the forum up-voting posts like this one , add comments about your case, etc. This will help confirm the importance of the feature and bring it to live sooner potentially.user10199063
@user10199063 For what it's worth, I voted for that idea. Also, I ended up using their (relatively) new feature of uploading an image straight to Azure Blob storage, it worked really well.Probably
Solution using a custom connector here -> johnliu.net/blog/2017/7/building-non-json-webservices-with-flowTolbxela
There is a solution to do it using a custom connector (here -> johnliu.net/blog/2017/7/building-non-json-webservices-with-flow). But, since Microsoft has recently changed the license policies for PowerApps and for using custom connectors you need at least paid Plan 1 (7$/mo) for all your Powerapps users. This is much too expensive for us. So, we are still looking for a solution without using of custom connectors. Are there any other solutions for this? Except using Onedrive+Excel (does not work well) and Azure Blob Storage (stil too expensive)Tolbxela

1 Answers

1
votes

We were able to solve the problem by saving pictures to a SharePoint List.

Here are useful links explaining the solution.

It's working!