Based on the suggestion in #40, I've tried to create an upload session like this: ``` async def create_upload_session(): resp = await client.drives.by_drive_id('driveId').items.by_drive_item_id('root:/{item-path}:').create_upload_session().post() asyncio.run(create_upload_session()) ``` but I get this: `TypeError: 'CreateUploadSessionRequestBuilder'` object is not callable so I've changed it to: ``` upload_session = await client.drives.by_drive_id(rds_drive_id).items.by_drive_item_id(f"root:{destination_full_path}:").create_upload_session.post() ``` but then I get `TypeError: body cannot be null.` Can you provide an example on how to properly create an upload session?
Activity
shemogumbe commentedon Aug 26, 2024
Hello Pawel Szmajda (@paulschmeida) thanks for using the SDK and for asking this.
To create an upload session, we use the CreateUploadSessionPostRequestBody
It takes DriveItemUploadableProperties
Examples:
You can then use PUT request on the upload_session following https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0
Response: