cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AA53
Helper I
Helper I

Upload document from powerapps to sharepoint

Hey Guys,

 

I have been trying to upload an image from powerapps to sharepoint. It gets uploaded successfully but the image cannot be opened in share point.

 

AA53_0-1598328682019.png

 

AA53_1-1598328701850.png

AA53_2-1598328714025.png

 

Please let me know how to fix this issue.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @AA53 ,

Regarding the flow's configuration and app's formula that you mentioned, I think there is something wrong with it.

 

I have made a test on my side, please try the following workaround:

 

The Flow's configuration as below:

3.JPG

Within the "Convert to binary image" action, Inputs field set to following:

dataUriToBinary(triggerBody()['Converttobinaryimage_Inputs'])

 

The canvas app's configuration as below:

4.JPG

Set the OnSelect property of the "Upload" button to following:

'PowerApp->Converttobinaryimage,Createfile'.Run(AddMediaButton1.FileName, Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", ""))

On your side, you should type:

'Your Flow Name'.Run(
                      AddMediaButton1.FileName, 
                      Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", "")
)

 

Please try above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @AA53 ,

Regarding the flow's configuration and app's formula that you mentioned, I think there is something wrong with it.

 

I have made a test on my side, please try the following workaround:

 

The Flow's configuration as below:

3.JPG

Within the "Convert to binary image" action, Inputs field set to following:

dataUriToBinary(triggerBody()['Converttobinaryimage_Inputs'])

 

The canvas app's configuration as below:

4.JPG

Set the OnSelect property of the "Upload" button to following:

'PowerApp->Converttobinaryimage,Createfile'.Run(AddMediaButton1.FileName, Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", ""))

On your side, you should type:

'Your Flow Name'.Run(
                      AddMediaButton1.FileName, 
                      Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", "")
)

 

Please try above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,202)