본문 바로가기

Cloud/Microsoft 365

OneDrive API

728x90
반응형
SMALL

Create an upload session to upload large files to oneDrive.

Below is the request address.

https://graph.microsoft.com/beta/users/{userId}/drive/root:/UploadFiles/{fileName}:/createUploadSession

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"
}

}

https://docs.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-beta#create-an-upload-session

 

출처: <https://stackoverflow.com/questions/ask>

 

 

https://github.com/KoenZomers/OneDriveAPI

728x90
반응형
LIST