Skip to content

upload file to onedrive through createUploadSession - itemWithPath() not found #167

@Pavani-Y

Description

@Pavani-Y

Hi David,
Found some posts on githud to do following for creating uploading session to upload an item to a drive using graph client. But i dont see the itemWithPath() available on root() for odataClientFactory. Can you please check on this. or suggest an alternative to CreateUploadSession, to upload large files to ondrive.
I'm referring to this api : https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online

graphClient
.users(oneDriveUserId)
.drive()
.root()
.itemWithPath("filename.pdf")
.createUploadSession(new DriveItemUploadableProperties())
.buildRequest()
.post();

Thanks,
Pavani

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions