Merge pull request #3351 from SupSuper/onedrive-fixes

Fix uploadSession error in OneDrive for Business
This commit is contained in:
Jaex 2018-04-29 03:48:55 +03:00 committed by GitHub
commit 94a93c02c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -203,7 +203,6 @@ private string CreateSession(string fileName)
{
item = new Dictionary<string, string>
{
{ "name", fileName },
{ "@microsoft.graph.conflictBehavior", "replace" }
}
});
@ -212,7 +211,9 @@ private string CreateSession(string fileName)
string url = URLHelpers.BuildUri("https://graph.microsoft.com", $"/v1.0/{folderPath}:/{fileName}:/createUploadSession");
AllowReportProgress = false;
string response = SendRequest(HttpMethod.POST, url, json, ContentTypeJSON, headers: GetAuthHeaders());
AllowReportProgress = true;
OneDriveUploadSession session = JsonConvert.DeserializeObject<OneDriveUploadSession>(response);