在微软图形API中,个人账户是否会阻止大块上传?

本文关键字:是否 API 图形 微软 | 更新日期: 2023-09-27 18:16:19

我从/MIchaelMainer/working分支测试了。net SDK代码,它对工作帐户运行良好。

但是,对于个人帐户(即使是小文件),它失败("Authentication failed")。

关于可恢复上传的文档并没有说这只是一个工作帐户功能。

也许是?还是有bug?如果这是一个错误,我在代码中看不到它可能在哪里,因为唯一的区别是帐户类型。

(相关:https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/61)

在微软图形API中,个人账户是否会阻止大块上传?

谢谢,Ryan。

在UploadChunkRequest.cs => SendRequestAsync()中,我做了这个更新(行注释):

        using (var request = this.GetHttpRequestMessage())
        {
            //await this.Client.AuthenticationProvider.AuthenticateRequestAsync(request).ConfigureAwait(false);
            request.Content = new StreamContent(stream);
            request.Content.Headers.ContentRange =
                new ContentRangeHeaderValue(this.RangeBegin, this.RangeEnd, this.TotalSessionLength);
            request.Content.Headers.ContentLength = this.RangeLength;
            return await this.Client.HttpProvider.SendAsync(request, completionOption, cancellationToken).ConfigureAwait(false);
        }

现在分块上传工作良好的个人和企业帐户!

Michael会更新GitHub中的代码,我想?

我还是无法上传到共享文件夹