-
Notifications
You must be signed in to change notification settings - Fork 126
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
How to get special app folder with the new SDK? #1977
Comments
@NLLAPPS thanks for reaching out. Drive drive = graphServiceClient.me().drive();
DriveItem specialFolder = graphServiceClient.drives().byDriveId(drive.getId()).special().byDriveItemId("{special folder name}").get();
UploadSession uploadSession = graphServiceClient.drives().byDriveId(drive.getId()).items().byDriveItemId(specialFolder.getId()).createUploadSession().post(uploadSessionRequest); Relevant docs links: |
Thank you. I am not usually this thick but getting my head around 6 series proven to be very hard.
Where I was able to upload "filename.txt" to ""some/sub/folder/and/" in "approot" special folder For 6 series, I am following the guide at https://learn.microsoft.com/en-us/graph/sdks/large-file-upload?tabs=java
But, I want to upload the file to the special "approot" folder and configure it like this:
Above example fails with Could you tell me how I am supposed to configure DriveItem name and path when uploading to special "approot" folder? Here is the full log
|
I have also dug through traffic of 5 series and noticed that Produces: But Produces below after multple requests: Isn't there any way to build |
OK, finally fixed it! See below. I must say it was excruciatingly hard. I hope MS will consider providing upgrade path on significant changes like this in the future. Issue I had created on Feb 17 2024 at Android Samples at https://github.com/microsoftgraph/msgraph-sample-android/issues not even acknowledged yet.
Above seems to create unnecessary requests. Each |
I am pulling my hair out trying to upload to special app folder https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/drive_get_specialfolder?view=odsp-graph-online
On 5 series, I was simply doing
val specialAppFolder = "approot" val uploadSession = graphServiceClient .me() .drive() .special(specialAppFolder) .itemWithPath(uploadDestination.removePrefix("/")) // removePrefix because OrganiserConverter.fromConfig will return /path/.. .createUploadSession(.....)
On 6+ I cannot figure-out how to get hold of specialAppFolder in order to createUploadSession().
Could someone with a better understanding point me to the right direction please?
The text was updated successfully, but these errors were encountered: