mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Merge pull request #3351 from SupSuper/onedrive-fixes
Fix uploadSession error in OneDrive for Business
This commit is contained in:
commit
94a93c02c7
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue