-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Inline metadata for tags and sharing in PROPFIND response #33503
Comments
GitMate.io thinks the contributor most likely able to help you is @PVince81. Possibly related issues are #2846 (Slow PROPFIND on Shared folders), #16427 (Tags and flexible sharing), #18450 (PROPFIND on federated share takes long), #2552 (Temporary 500 response for PROPFIND with multiple users), and #13168 (Ability to share by tag). |
Tags have different scopes: so setting them in clear text is not possible currently. This is why they require ids. In each scope (visible, invisible, restricted) a tag with a similar name could exist. (this was an old design decision which I find regrettable, but this is how it is now) Due to this, if we want to be able to create tags with PROPPATCH, one would need to pass all this information and the backend would need to match against existing tag or create it if needed. On the XML level I guess it should be possible to add additional sub-fields to make room for this. I wonder if in OC 11 we should rework the tags and merge all the scopes which would simplify a lot. cc @pmaier1 |
and with "merging the scope" I just mean "have a single list of unique tag names with attached scopes" instead of have "three separate lists of tag names, one per scope with duplication possible". |
Yeah, that's what I was thinking of.
I wasn't aware that tag names could exist multiple times, in different scopes. Making this impossible in the future certainly sounds like a goal well worth pursuing. A migration path for installations using the same tags in different scopes could be to rename the affected tags by pre-pending the name of the scope to them. Zooming out and looking at the big picture, something I'd really love to see is:
I believe such a metadata API could also open up ownCloud to many new uses that it can't address as directly right now. /cc @PVince81 @DeepDiver1975 @felixboehm @michaelstingl @pmaier1 |
One of the issues with having just a single namespace for all names (no name duplication) is that as soon as you make features that restrict tag visibility, then the single namespace means:
|
You can already use custom Webdav attributes for that: PROPPATCH for setting, PROPFIND for reading. However it only works correctly with single string values, not sub-tags. |
to clarify, you can invent an attribute name like "oc:myattr" and set it on a file with PROPPATCH. It will stay attached to the file. |
This was the main reason for providing these different scopes/namespaces. But in hindsight I'm not sure there is much value nor criticality in such ability for "guessing" when compared to the advantage and reduced complexity of having a single namespace. |
Is it also possible to store data on a per-user basis (f.ex. for bookmarks in PDFs, which will be different for different users)? Does changing custom metadata change the eTag of the item, or the collection its stored in? |
The custom properties are global for all users, there is no per-user file metadata currently. Size limit is the one from the DB table:
Maybe we should change that propertyvalue column to be a BLOB/CLOB... @DeepDiver1975 |
raised #33554 to blobify propertyvalue. |
cc @tomneedham and @micbar who have been using this table for some app, in case there is further input |
Just got an idea how per-user attributes could be implemented rather cheaply and thought I'd share it: by adding special prefixes to attribute names and checking for permission on the server side: F.ex. an attribute
Possible even cheaper: The attribute could also just be named /cc @DeepDiver1975 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
Motivation and status quo
I'm currently working on the iOS file provider for the new ownCloud
ios-sdk
andios-app
and found the current support incomplete for its purposes:PROPFIND
, instead requiring one request per item, which:PROPFIND
that provided the list of items, and the server answering the Tags API requests for these items. There's no guarantee that item 1 from thePROPFIND
still has the same tags 100 Tags API request later.Proposal
What I'd like to see is
PROPFIND
PROPPATCH
Benefits:
What should be covered, in order of importance:
Possible optimization:
Allow formulating
PROPFIND
s in a way that metadata that doesn't exist for an item (f.ex. no tags, no shares, no comments) is omitted from the multi status response, including the404 Not Found
section for the item(s).The text was updated successfully, but these errors were encountered: