Closed jculverwell closed 6 years ago
Hi, just wondering if you had any thoughts regarding 'special folders'. Cheers
Hi @jculverwell, I've just released v2.0.3.0 of the API in which commands have been added to work with AppFolders. I've also updated the demo application to provide samples of how to apply every possible operation to AppFolders through these new APIs.
Thank you, really appreciate this. I'm going to update and test next week. Thanks again
Haven't heard back from you @jculverwell. I'm going to assume the added functionality works now. If not, feel free to reopen this topic.
Thank you kindly for a great repo, the authentication using a refresh token is so much nicer than the official OneDrive SDK.
I am currently stuck on how to upload to the App folder as described here https://docs.microsoft.com/en-us/onedrive/developer/rest-api/concepts/special-folders-appfolder and here https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/drive_get_specialfolder
I am using the UploadFileAs method but this is failing.
Looking at the code I think the issue is that GetItem function uses 'drive/root:/' whereas 'special folders use '/drive/special/'. For example the app folder is '/drive/special/approot'.
Thinking out aloud I think one fix could be something like below with basically attempts to not not prefix special paths with drive root.
Actually it would probably be better to use StartsWith as below: