通过标签直接在团队中打开文件 [英] Open a file directly in Teams from a tab

查看:85
本文介绍了通过标签直接在团队中打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将SharePoint Webpart(SharePoint框架)部署到Microsoft Teams.在此Web部件中,我有一个要直接在Teams中打开的文件列表.

我试图从文件"选项卡中获取链接(我设法直接在Teams中打开文件.我必须设置URL格式:

  https://teams.microsoft.com/l/file/{file-id}?tenantId = {tenant-id}& fileType = {文件类型(jpg,xlsx,docx,...)}& objectUrl = {文件编码链接(SharePoint链接,高级URL)} 

I have deployed a SharePoint webpart (SharePoint Framework) to Microsoft Teams. In this web part, I have a list of files that I want to open directly in Teams.

I have tried to get the link from the "Files" tab (https://teams.microsoft.com/l/file/7FFA7D9D-CBF1-4679-9C80-76446AE11ABD?tenantId=0f48c6f4-52a5-4553-b476-4ee2ee0aecca&fileType=docx&objectUrl=https%3A%2F%2Fxyz.sharepoint.com%2Fsites%2FAZRTZ%2FShared%20Documents%2FGeneral%2FArchitecture%2FTest.docx&baseUrl=https%3A%2F%2Fxyz.sharepoint.com%2Fsites%2FAZRTZ&serviceName=teams&threadId=19:0d1f6f397c51421189e791a9ab436a48@thread.skype&groupId=98edc5a8-02ac-4f58-8638-ea88ac6aaa4d) and put it in the href="" of the link. It does not work, it opens the file in the browser.

I also tried to put the direct link in the href (https://xyz.sharepoint.com/sites/AZRTZ/Shared Documents/General/Architecture/Test.docx). It downloads a copy of the file in the browser.

I want to open the file directly into Teams, the same way the files are opened if the user goes to the "Files" tab (eg. if the user opens a .doc file, Word Online in Teams must open, if the user opens an image, a previsualisation in Teams must be opened, ...)

解决方案

Using the Deep link I managed to open the file directly in Teams. I had to format the URL :

https://teams.microsoft.com/l/file/{file-id}
?tenantId={tenant-id}
&fileType={file-type (jpg, xlsx, docx, ...)}
&objectUrl={file-encoded-link (SharePoint link, aboslute URL)}

这篇关于通过标签直接在团队中打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆