Hi Benoit, An example how to do it is the TagsPlugin from OC 8 which brings tags and favorites: It will show you how to override beforeGetProperties to do what you're trying to achieve: https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/tagsplugin.php
HOWEVER there is one open issue: currently apps cannot register their own Sabre plugins into the default remote.php. So unless you hard-code the register call here https://github.com/owncloud/core/blob/master/apps/files/appinfo/remote.php#L64 the plugin approach will not work unfortunately. I raised https://github.com/owncloud/core/issues/15879 to discuss such possibilities in the future. Another approach would be to rely on the existing custom properties plugin which already allows you to pass custom properties to a PROPPATCH call and retrieve them later through PROPFIND. Such properties are always stored in the "oc_properties" table. Hope this helps a bit. Cheers, Vincent On 27.04.2015 10:25, Benoît Pitet wrote: > Hi all ! > > I would like to add some custom properties associated to each files managed > by owncloud I would like to retrieve this properties throught the webdav > protocol like "<oc:permissions/>", "<oc:size/>" properties. > > I write a custom app with a custom table to store my properties for each > file (imitating the "files_tashbin" and "files_version") and now I would > like to retrieve and inject this properties on the webdav protocol. > > Looking at Sabre documentation and owncloud source code, I found that I > could extend the 'OC_Connector_Sabre_FilesPlugin' class and override the > 'beforeGetProperties' and this should do the trick. > > But how can I inject this plugin on the default 'OC_Connector_Sabre_Server' > server when my app is activated ? > > Or is there any other way to do that ? > > Thanks for any response. > > > > Benoit > > > > _______________________________________________ > Devel mailing list > [email protected] > http://mailman.owncloud.org/mailman/listinfo/devel
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Devel mailing list [email protected] http://mailman.owncloud.org/mailman/listinfo/devel
