title: How to perform a resumable Upload to a SharePoint Site (Not Root) Subfolder using MS Graph API
body: <p>Documentation:</p>
  
  <p><a href="https://docs.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0</a></p>
  
  <p>I am able to get the Drive ID of the sub site using the sites/domain/drives api. Using this and the driveId/root/children I can confirm several folders on this drive.</p>
  
  <p>If I use the API POST /drives/{driveId}/items/{itemId}/createUploadSession replacing the driveId with the drive ID and the itemId with the folder ID I get the following error</p>
  
  <pre><code>{
    "error": {
      "code": "nameAlreadyExists",
      "message": "Cannot create an upload session on a folder",
      "innerError": {
        "request-id": "609e17d5-b3f8-455d-9d0f-4849872d8cfa",
        "date": "2020-02-25T20:31:33"
      }
    }
  }
  </code></pre>
  
  <p>If the folder ID is not the ItemID, what is an ItemID ? How do I specify the folder that I want to save a file to? Or a subfolder or folders? None of the otpions let me use anything other than ItemID</p>
  
  <pre><code>POST /drives/{driveId}/items/{itemId}/createUploadSession
  POST /groups/{groupId}/drive/items/{itemId}/createUploadSession
  POST /me/drive/items/{itemId}/createUploadSession
  POST /sites/{siteId}/drive/items/{itemId}/createUploadSession
  POST /users/{userId}/drive/items/{itemId}/createUploadSession 
  </code></pre>