Reputation: 311
Create an upload session to upload large files to oneDrive.
Below is the request address.
Request Body
{
"item": {
"@odata.type": "microsoft.graph.driveItemUploadableProperties",
"@microsoft.graph.conflictBehavior": "rename",
"name": "largefile.dat"
}
}
An Invalid request error occurs. What's wrong with it? I watched the tutorial and tested it.
POST /drive/root:/{item-path}:/createUploadSession Content-Type: application/json
{
"item": {
"@odata.type": "microsoft.graph.driveItemUploadableProperties",
"@microsoft.graph.conflictBehavior": "rename",
"name": "largefile.dat"
}
}
Upvotes: 1
Views: 1469
Reputation: 4192
As Shiva suggested in a comment on the question, the issue is that the value of @odata.type
is not correct for this case. In general you should not provide it at all as the schema is strongly typed and therefore the appropriate value can be derived without any client-driven hints.
Upvotes: 2