Forum Discussion
e_morling
Oct 31, 2020Copper Contributor
Integrate & display files in custom app
What is the best way to integrate files within Teams in a custom app? Is there a framework/widget for:
- Selecting a file within Team
- Display a file within your App (e.g. PPT, PDF, Excel, Word)
- Controlling the current slide/page, if you want all users to see the same thing?
Thanks
- Nikitha-MSFTMicrosoft
e_morling - Yes you can display the file with in the teams. You can provide the file url to the tab and open the file with in the tab Or to the adaptive card button, but you need to encode the file url please check the below code to encode the URL.
new AdaptiveOpenUrlAction() { Title = actionText, Url = new Uri(GetFileViewerURL("Your File URL here", "pptx")) }; private string GetFileViewerURL(string actionData_URL, string prefix) { return $"https://teams.microsoft.com/_#/{prefix}/viewer/teams/" + actionData_URL?.Replace("/", "~2F"); }
- e_morlingCopper Contributor
Nikitha-MSFT Thank you, do you have an example with Javascript?
- Nikitha-MSFTMicrosoft
e_morling - Currently we don't have example in javascript