Uploading Image to SharePoint from PowerApps via Flow
Asked Answered
B

1

9

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.

Bushy answered 2/11, 2017 at 21:22 Comment(5)
"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.Elysium
@Elysium 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.Bushy
Solution using a custom connector here -> johnliu.net/blog/2017/7/building-non-json-webservices-with-flowHertford
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)Hertford
See powerapps911.com/post/how-to-use-power-apps-to-upload-a-file if you would like to upload arbitrary files to a SharePoint Document library.Chittagong
H
2

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

Here are useful links explaining the solution.

It's working!

Hertford answered 16/4, 2019 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.