Add support for working with shared items
Started working on this in the shared-items branch. So far it seems like shared items are identical to normal items, with the addition of a remoteItem facet (nothing special aside from the fact that the parentReference of the remoteItem has a different drive id). Support can be handled easily with two caveats:
- We need to track the drive ID of all items and change everything to start making requests to
/drives/<drive-id>/items/<item-id>instead of just/me/drive/items/<item-id> - The remote ID of the item can change when it's moved to or from a share. So we should check for the ID changing on a rename op (or the parent drive ID changing).
Is the work still in progress?
I found rclone worked better for this purpose
@jasonblewis
I found rclone worked better for this purpose
FYI - rclone does not take into account various SharePoint oddities that modifies your file post upload - thus leaving you multiple different versions of files.
The only client that handles these oddities is the 'onedrive' client that I develop.
Is the work still in progress?
Yes, but I can be a bit slow at implementing things... this project was started as a for-fun project and I work on this in my spare time as life permits. If not having support for shared items is a must-have, I suggest watching this repo (it's an option on the frontpage of the repo next to the "star" button and tell it to notify you on new releases. In the meantime, @abraunegg's suggestion to use abraunegg/onedrive will serve you well if you need support for shared items.
Thank you for the quick response. Will keep a watch on this repo and will use abraunegg/onedrive until then.
I took a stab at this over the last few days and have stuff semi-working - left to do/things that need to be fixed somehow:
- [ ] Need to create some testing automation that sets up the shared folders for:
- [ ] Personal accounts
- [ ] Sharing files/folder from another account.
- [ ] Business accounts
- [ ] Sharing files/folders from another account not in org
- [ ] Sharing files/folders from a business account in org
- [ ] Personal accounts
- [ ] What happens if an item is unshared while we are using it?
- [ ] Implement watching shared folders for changes (perhaps have a delta thread for each folder that we kill if it is unshared/deleted)
- [ ] Implement/test cross-drive moves/copies (copying from your drive to a shared folder or vice-versa). Watch for if the IDs change.
- [ ] Libreoffice once again is causing problems - it refuses to open directly shared files (directly shared in the "Shared with me" folder, not in a shared folder) except in read-only mode because it can't create a lockfile and it will also have a problem saving because it can't save files under random names and then move them to the final destination.
Hey @jstaf, awesome work here! Is this issue still being worked on?
Hey @jstaf i am interested in this too. Appreciate your work!! Thanks