简体   繁体   English

使用 MS Graph Rest API 将文件上传到文档集

[英]Upload Files to Documentset with MS Graph Rest APi

I am trying to figure out how to upload files to a document set.我想弄清楚如何将文件上传到文档集。 It uses Lists, for upload files to a drive, it works following the manual i found on docs.microsoft.com它使用列表,将文件上传到驱动器,它按照我在 docs.microsoft.com 上找到的手册工作

  • this is my case.这是我的情况。 for each order ia documenset created by ms graph rest API.对于由 ms graph rest API 创建的每个订单 ia 文档集。 when files added to the order they must be uploaded to the document set.当文件添加到订单时,它们必须上传到文档集。

''' Already working '''已经工作

  • Upload Files to a drive将文件上传到驱动器
  • To a List - create folder - change to custom documentset Not working - or cant figured out.到列表 - 创建文件夹 - 更改为自定义文档集 不起作用 - 或无法弄清楚。 Upload file in create documentset.在创建文档集中上传文件。 ''' '''

But how or and how are they stored in SharePoint.但是它们是如何或如何存储在 SharePoint 中的。 , for each drive, i get a drive id, for each document in, does have them the same listid or? ,对于每个驱动器,我得到一个驱动器 id,对于每个文档,它们是否具有相同的 listid 或?

I figured it out.我想到了。

When you need to find out the relation between ListItems or DriveItems, just add - Driveitem after the listId.当你需要找出ListItems或DriveItems之间的关系时,只需在listId后面加上-Driveitem即可。 Then you wil get the DriveID.然后您将获得 DriveID。 In the same way, it works for getting to know the listId - add DriveaId of the ListID.以同样的方式,它可以用于了解 listId - 添加 ListID 的 DriveaId。

Now I can add the correct file to the correct documentset(folder).现在我可以将正确的文件添加到正确的文档集(文件夹)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM