当我使用SDK上传会话时,我想推迟文件提交。这可以通过API:https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0
{“item”:{“@microsoft.graph.conflictBehavior”:“rename”},“defeCommit”:true}
但在SDK:https://learn.microsoft.com/en-us/graph/sdks/large-file-upload?tabs=csharp我找不到相当于DriveItemUploadableProperties对象
public class DriveItemUploadableProperties
{
public DriveItemUploadableProperties();
public string Description { get; set; }
public long? FileSize { get; set; }
public FileSystemInfo FileSystemInfo { get; set; }
public string Name { get; set; }
public IDictionary<string, object> AdditionalData { get; set; }
public string ODataType { get; set; }
}
如何发送deferCommit标志以及如何发送completing标志?
编辑1:
我试过:
DriveItemUploadableProperties properties = new DriveItemUploadableProperties
{
ODataType = null,
AdditionalData = new Dictionary<string, object>
{
{ "@microsoft.graph.conflictBehavior", "replace" },
{"deferCommit", true}
}
};
但是它不起作用
属性
不是 driveItemUploadableProperties 类的成员。此属性应设置为DriveItemUploadableProperties的附加数据
的一部分。有关如何显式完成上传的详细信息,请参阅有关完成文件的文档。
这可能看起来像这样:
AdditionalData = new Dictionary<string, object>
{
{ "@microsoft.graph.conflictBehavior", "replace" },
{"deferCommit", true}
},
让我知道这是否有帮助,如果你有进一步的问题。