小议Microsoft 365 内容存储管理

网友投稿 226 2022-09-29

小议Microsoft 365 内容存储管理

Blog链接:​​是Microsoft 365 用来存储内容的服务,Microsoft Teams使用他们来进行内容协作,Teams中的生成的文档都存储在SharePoint站点中,而聊天中产生的文档是存储在个人的OneDrive中,此外所有Microsoft Teams的会议记录都保持在OneDrive或者SharePoint站点中。

说明:如果终端用户没有被分配到SharePoint License,那么他们就不会有OneDrive 存储,那么用户就无法在聊天中分享文档。

接下来,介绍一下Teams内容存储的详细部分。

·       如果我们在Channel中分享文件,比如在Channel的会话窗口中发布一个文件或者图片,那么文件或者图片会存储在SharePoint DocumentLibrary的Channel Folder里

·       如果文件是发送到Channel的,比如一封带有附件的电子邮件发送给Channel,那么文件会存储在SharePoint DocumentLibrary的Channel folder的子文件夹“Email Message”中

·       如果是Channel的会议记录,那么回存储在SharePoint DocumentLibrary的Channel Folder的子文件夹“Recording”中

说明:从图中我们可以看出若Teams中含有Private Channel,那么它的Private Channel的Site是独立于Parent Team的SharePoint Site,文档存储在该Private Channel的Site 的Document Library的Channel folder中,文档的访问权限仅限于Private Channel的成员。

Microsoft Teams与OneDrive之间的关系是微妙的,OneDrive 中的Microsoft Teams Chat File是迎来存储与其他用户在Microsoft Teams中进行1:1或者1:Group Chat中共享的文件,并自动分配权限。此外,非Channel Meeting的recording也会存储在会议录制的所有者的OneDrive->Recordings的文件夹中。

但由于OneDrive的存储空间有限,如果存储过多的视频或者文档,那么久而久之,OneDrive的存储就会溢出,为了解决这个问题,所以微软推出了Recording Lifecycle,默认新视频文件保存后,60天会自动过期,过期后就会自动被删除。所以有些IT Admin,有一些合规要求,不能删除这些视频文件,那么要么关Meeting Recording自动过期功能,要么就是将视频文件上传到Stream中。

借助Azure的Media Service V3资源,使用Azure Storage APIs来上传文件到Stream中,示例代码如下,仅供参考:

private static async Task CreateInputAssetAsync( IAzureMediaServicesClient client, string resourceGroupName, string accountName, string assetName, string fileToUpload){ // In this example, we are assuming that the asset name is unique. // // If you already have an asset with the desired name, use the Assets.Get method // to get the existing asset. In Media Services v3, the Get method on entities returns null // if the entity doesn't exist (a case-insensitive check on the name). // Call Media Services API to create an Asset. // This method creates a container in storage for the Asset. // The files (blobs) associated with the asset will be stored in this container. Asset asset = await client.Assets.CreateOrUpdateAsync(resourceGroupName, accountName, assetName, new Asset()); // Use Media Services API to get back a response that contains // SAS URL for the Asset container into which to upload blobs. // That is where you would specify read-write permissions // and the exparation time for the SAS URL. var response = await client.Assets.ListContainerSasAsync( resourceGroupName, accountName, assetName, permissions: AssetContainerPermission.ReadWrite, expiryTime: DateTime.UtcNow.AddHours(4).ToUniversalTime()); var sasUri = new Uri(response.AssetContainerSasUrls.First()); // Use Storage API to get a reference to the Asset container // that was created by calling Asset's CreateOrUpdate method. BlobContainerClient container = new BlobContainerClient(sasUri); BlobClient blob = container.GetBlobClient(Path.GetFileName(fileToUpload)); // Use Strorage API to upload the file into the container in storage. await blob.UploadAsync(fileToUpload); return asset;}

谢谢大家阅读,相关资料参考:​​Upload,encode, and stream with Media Services v3 - Azure Media Services v3 | MicrosoftDocs​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:SpringBoot整合RabbitMQ实战教程附死信交换机
下一篇:物联网网关如何实现PLC转Sparkplug
相关文章

 发表评论

暂时没有评论,来抢沙发吧~