Fix OneDrive in Business 400 error

This commit is contained in:
SupSuper 2018-04-29 01:20:39 +01:00
parent d4b050148b
commit 559aad05ab

View file

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