I'm try to upload an image from powerapps to Sharepoint doc lib using flow. I was able to upload the file/image but image can't be preview once loaded to the sharepoint doc library. see images: Please help.
PowerApps Action: UploadafiletoSharePointfromPowerApps.Run("ID",AddMediaButton2.Media)
Flow: see image
I can't find a solution. Help.
May I know why did you add the Compose in flow? I think below flow should be enough if you just want to upload files to SharePoint library from PowerApps.
I do not have your issue using this flow in the app.
I have managed to create a flow that uploads a picture from PowerApps to a SharePoint picture library by using the following:
The dataUriToBinary step is important to change the type of the object returned by PowerApps.
The formula is this: dataUriToBinary(triggerBody()['Createfile_FileContent'])
I would suggest to paste that formula in the expression editor and press update:
Note! you cannot test this in the editor app preview, it only works when you run the app outside the editor. For some reason, in editor it returns a different data type, than outside of it.
Hope this helps 🙂
What is the object that you pass to it from PowerApp? I am trying to upload from an image upload control in PowerApp. The UploadImage.Image doesn't seem to be the expected object for the dataUrlToBinary function?
I am using the take picture control in that case.
I am just about to have a look at the upload image control to see how it behaves. I'll let you know if I find a working solution.
@MelindaK Hi Melinda, i try this script on Flows too, but i got error when trying to run this flow on Powerapps, when i use flow without the "compose", the file were created, but inside them the file content was the Blob:URL, not a file itself, ok so this function i am not sure how to send the URI, please your help, on the script detailed on Flows, and When i call the Flow from a OnSelect button parameters. Thanks in advance
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.