Skip to content
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

Add Share and Unshare APIs to vfs #76

Open
mahsashadi opened this issue Mar 7, 2023 · 3 comments
Open

Add Share and Unshare APIs to vfs #76

mahsashadi opened this issue Mar 7, 2023 · 3 comments

Comments

@mahsashadi
Copy link
Contributor

Hi.

How do you think about adding share and unshare APIs to VFS, so that files could be shared with some other users ( for example by adding some metadata to files ).
This would allow having our storage APIs implemented in our VFS adapter.

@andersevenrud
Copy link
Member

Sounds nice.

One way this could be solved would be to have an internal service that connects to some kind of database and when you "share" a file a row would be inserted with the path and the user id or something like this. This would be server-side VFS only.

Then it would be possible to provide a mountpoint with a VFS adapter that uses the same database to enumerate files etc.

This approach would require it to work like this:

  • A user (1) navigates to home:/stuff and shares their file README.txt
  • An API call is made to the service and this is inserted: {sourceUserId: 1, targetUserIds: [/* a list or none for all... could even be groups*/], path: 'home:/stuff/README.txt' }`
  • A user (2) now can go to shared:/ and see the following structure <name of user 1>/stuff/README.md.

@mahsashadi
Copy link
Contributor Author

mahsashadi commented Mar 11, 2023

Thanks for your reply and your detailed solution.
Is it possible to only have these APIs signatures on VFS for now?
We need this sharing logic in our swift vfs adapter, which its implementation is completely different.

@andersevenrud
Copy link
Member

It could probably be solved in a few different ways. I don't really know what solution would fit your use-case the best.

But if it's something you need for your custom adapter, then I suppose it could be purely solved in the VFS side of thing for the most part (UI needs support as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants