I am trying to implement Upload large files with an upload session.
For now I have (getting the upload session):
UploadSession uploadSession = await graphClient
.Users["user3@myComp.onmicrosoft.com"]
.Drive
.Root
.ItemWithPath(@"\someFolder\file.txt")
.CreateUploadSession()
.Request()
.PostAsync();
The response from this request is some session URL but when I upload the file chunk to this URL I'm getting an error:
{
"error": {
"code": "invalidRequest",
"message": "DeferCommit was set to false for this upload session."
}
}
Does anyone know what causes this error?