Microsoft Graph API 中的个人帐户是否已阻止分块上传?
Are chunked uploads blocked for personal accounts in the Microsoft Graph API?
我从 /MIchaelMainer/working 分支测试了 the .NET SDK code,它对工作帐户运行良好。
但是,对于个人帐户(即使是小文件),它会失败 ("Authentication failed")。
The documentation about resumable uploads 没有说明这只是一个工作帐户功能。
也许是?还是有错误?如果它是一个错误,我在代码中看不到它可能在哪里,因为唯一的区别是帐户类型。
(相关:https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/61)
谢谢,瑞安。
在 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 中更新代码,我想?
我还做不到的是。
我从 /MIchaelMainer/working 分支测试了 the .NET SDK code,它对工作帐户运行良好。
但是,对于个人帐户(即使是小文件),它会失败 ("Authentication failed")。
The documentation about resumable uploads 没有说明这只是一个工作帐户功能。
也许是?还是有错误?如果它是一个错误,我在代码中看不到它可能在哪里,因为唯一的区别是帐户类型。
(相关:https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/61)
谢谢,瑞安。
在 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 中更新代码,我想?
我还做不到的是