onedriver icon indicating copy to clipboard operation
onedriver copied to clipboard

Add support for working with shared items

Open jstaf opened this issue 6 years ago • 8 comments

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).

jstaf avatar Apr 17 '20 04:04 jstaf

Is the work still in progress?

rajiv-kanchan avatar Sep 14 '21 13:09 rajiv-kanchan

I found rclone worked better for this purpose

jasonblewis avatar Sep 14 '21 23:09 jasonblewis

@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.

abraunegg avatar Sep 15 '21 01:09 abraunegg

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.

jstaf avatar Sep 15 '21 01:09 jstaf

Thank you for the quick response. Will keep a watch on this repo and will use abraunegg/onedrive until then.

rajiv-kanchan avatar Sep 15 '21 05:09 rajiv-kanchan

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
  • [ ] 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.

jstaf avatar Jul 10 '22 21:07 jstaf

Hey @jstaf, awesome work here! Is this issue still being worked on?

Tiebe avatar Nov 28 '23 12:11 Tiebe

Hey @jstaf i am interested in this too. Appreciate your work!! Thanks

candiesdoodle avatar Nov 30 '23 05:11 candiesdoodle