Where are DAV properties persisted and how to add new ones?

I’m trying to figure out the role of webdav properties and how to add them per @skjnldsv 's suggestion to make IPTC keywords available as DAV properties in https://github.com/nextcloud/photos/issues/226#issuecomment-626520689
Are there any docs besides https://docs.nextcloud.com/server/latest/user_manual/files/access_webdav.html#webdav-configuration to help me understand the Nextcloud webdav implementation? Also, is there an ERD somewhere for the Nextcloud data schema? I’ve been wading around in the Mariadb tables but it’s still a little opaque to me how and what file data is maintained as dav properties, and where.


NC uses SabreDAV as WebDAV server - maybe they have the documentation your are looking for?


Yeah, I’ve looked through the SabreDAV docs. There’s a MySQL DDL example for property persistence which looks like the properties table in NC. The table is empty on my instance, but I still get properties returned by accessing files on my server with curl , so how is that data defined and where is it coming from?

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:s="http://sabredav.org/ns">
        <d:getlastmodified>Fri, 03 May 2019 02:52:30 GMT</d:getlastmodified>
      <d:status>HTTP/1.1 200 OK</d:status>

Here also some useful docu: https://docs.nextcloud.com/server/18/developer_manual/client_apis/WebDAV/search.html?highlight=sort

Yes, I’ve seen those, thanks @gas85. They still don’t explain the persistence and configuration of DAV properties in Nextcloud.

1 Like

Okay, so looks like basic/default properties like contenttype are mapped to filecache table somewhere and the properties table is used to persist custom properties via PROPPATCH.