cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
LEARN_IT
Level: Powered On

FILE TO SHAREPOINT

hello,

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. 

CantPriview.JPG

 

 

PowerApps Action: UploadafiletoSharePointfromPowerApps.Run("ID",AddMediaButton2.Media)

 

Flow: see image

CantPriview3.JPG

 

 

 

I can't find a solution. Help.

10 REPLIES 10
Community Support Team
Community Support Team

Re: FILE TO SHAREPOINT

Hi @LEARN_IT,

 

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.

 

Capture.PNG

 

I do not have your issue using this flow in the app.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ajs1
Level: Powered On

Re: FILE TO SHAREPOINT

thank you. 

can you show the formula of how you use it? dont you have to provide YourFlow(Filename, Filecontent) in the app?

 

LEARN_IT
Level: Powered On

Re: FILE TO SHAREPOINT

Can you view the image in SharePoint? I don't think so, I'm using everything to get the job done. still. Let me know.

aifong
Level: Powered On

Re: FILE TO SHAREPOINT

Hey ajs1, just wondering if you found the answer yet?

ajs1
Level: Powered On

Re: FILE TO SHAREPOINT

unfortunatelly I`m still waiing for Microsoft to add these type of features: uploading to Azure blob, sharepoint, etc.... Seems like there is a HUGE DEMAND for it.

MelindaK
Level 8

Re: FILE TO SHAREPOINT

Hi @ajs1

 

I have managed to create a flow that uploads a picture from PowerApps to a SharePoint picture library by using the following:

 

flow.png

 

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:

flow2.png

 

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 🙂 

MelindaK
aifong
Level: Powered On

Re: FILE TO SHAREPOINT

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?

MelindaK
Level 8

Re: FILE TO SHAREPOINT

@aifong

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
AlexVR
Level: Powered On

Re: FILE TO SHAREPOINT

@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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 293 members 3,164 guests
Please welcome our newest community members: