Oct 31 2020 04:29 PM
What is the best way to integrate files within Teams in a custom app? Is there a framework/widget for:
Thanks
Nov 02 2020 04:17 AM
@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");
}
Nov 03 2020 08:00 AM
@Nikitha-MSFT Thank you, do you have an example with Javascript?
Nov 04 2020 03:22 AM
@e_morling - Currently we don't have example in javascript
Nov 04 2020 05:42 AM
@Nikitha-MSFT But it is possible to do in Javascript? With the example you provided in Java, is the file "on top" of the application? So that once the user closes the file the app is still open behind it?
Nov 04 2020 08:15 PM
@e_morling - The code which I provided for the file not application. When you close it will close the file not application. It is by design.