-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upload file to onedrive through createUploadSession - itemWithPath() not found #167
Comments
Tried below code with odataClientFactory . Throws invalid request error. Error:Bad Request |
Ok, thanks. The use of a request like |
Thanks David. Will try for custom request. |
Hi David, I'm receiving response like below from httpResponse.getText() here: And then, I'm trying to upload content using upload url received from above method. I'm using below put method to execute the uploadurl. But i receive { "responseCode": 202, "bytes": null, "text": null } in httpResponse. As per documentation, i would need to get response as below: Can you please check on why httpResponse.getText() is null in the response. Also please suggest if any alternative, as i would need the actual reponse text. Thanks, |
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
The text was updated successfully, but these errors were encountered: