Search code examples
restonedrive

How can I have the OneDrive {itemId} before creating upload session?


I am using OneDrive rest API for my webapp using the code flow. I see some HTTP request samples in this page for uploading large files. It says that to begin a large file upload, I must first request a new upload session. But all of listed samples are containing {itemId} in its header. The question is how can I have the {itemId} before creating upload session?


Solution

  • /drive/root:/{item-path}:/createUploadSession

    "item-path" is the name of the folder that you will be uploading to. You can use folder name (eg: uploads)