cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous ,

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 @Anonymous ,

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.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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