haiwen / seafdav

Seafile webdav server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFC custom dav properties

barrydegraaff opened this issue · comments

Hello,

I am writing an 3rd party integration for Seafile using the API and WebDAV. Not sure if I should use WebDAV at all. But since I am re-using an existing project.

I have a question, does seafdav support custom dav properties? I looked in PropertyManagerInterface and this does not seem to be the case. It would be nice to have at least the parent repo_id. So I do not need to make an API call just to find that. And when using the API and DAV combined, I pretty much always need repo_id.

Right now I can do:

     curl --user 'user:password' -i -X PROPFIND https://server.example.com/seafdav/ --upload-file - -H "Depth: 1" <<end
     <?xml version="1.0"?>
     <a:propfind xmlns:a="DAV:">
     <a:prop><a:resourcetype/></a:prop>
     </a:propfind>
     end

I want to extend it to:

     curl --user 'user:password' -i -X PROPFIND https://server.example.com/seafdav/ --upload-file - -H "Depth: 1" <<end
     <?xml version="1.0"?>
     <a:propfind xmlns:a="DAV:">
     <a:prop xmlns:sf=”http://seafile.org/sf">
     <a:prop><a:resourcetype/></a:prop>
     <sf:parentrepoid/>
     </a:propfind>
     end

For example Nextcloud implements custom DAV properties as well to support their file-sharing API's when used in combination with DAV.

See also
https://www.greenbytes.de/tech/webdav/draft-reschke-webdav-allprop-include-latest.html

Hi @barrydegraaff

Currently the support for WebDAV in Seafile is just the minimal. We don't plan to add extended features to WebDAV since Seafile doesn't rely on it heavily. So could you do without the extended properties? If I understand correctly, you can already work with Seafile just with standard WebDAV protocol. Listing, download, uploading all work.

Perhaps you can tell us more details about how you plan to integrate with Seafile by WebDAV.

Hi @barrydegraaff

Thanks for the information. I think you may use WebDAV to upload/download documents to Seafile. But for creating share links it needs to use our web API. Actually we have developed a Zimlet for adding share links in Zimbra: https://github.com/haiwen/seafile-zimlet. But we don't have enough time to maintain this Zimlet. If you're interested, you can fork and keep it up to date, or reuse some code from that Zimlet.