WebDAV

WebDAV is a HTTP based standard for remote web content authoring operations. It is described in RFC 2518. All common operating systems supply a client for WebDAV. WebDAV allows to access an hierarchical structured repository of resources like a regular file system. To the user there is often no visibly difference to any other file system. It offers operations like copying, moving, creating, or deleting resources. A resource is either a document or a folder.

SeedDMS allows to access the folder and documents with a WebDAV client and maps the operations on resources as closely as possible on SeedDMS’s operations. Unfortunately many of SeedDMS’s features cannot be implemented with WebDAV or are not currently supported, e.g. workflows, document links or attachments.

The WebDAV operations use the same code like the web user interface. This means that controller hooks are called as expected and notification are being as if documents are modified, created or deleted through the web user interface.

Resource names

Resources in WebDAV have a unique name in a hierarchical namespace where the hierarchy is delimited with the “/” character. At first sight this is very similar to SeedDMS’s naming convention. Folders in SeedDMS can easily be mapped into this namespace (if certain conditions apply) but choosing the right name for a document is crucial. A document name in SeedDMS is not necessarily unique, not even in the same folder, it may contain almost arbitrary characters and does not necessarily have an extension like .pdf or .png. Using such a name can be problematic when taken as a WebDAV resource name. SeedDMS tries to circumvent these problems as best as possible by removing or replacing those characters.

Another problem is the uniqueness of document and folder names. SeedDMS ensures uniqueness by its internal document and folder id, but is not as strict on names. Several documents with the same name in one folder will all show up in the WebDAV directory listing, but accessing one of them will always return the first one. This can be quite confusing for the user and potentially dangerous. For that reason the configuration ‘Allow duplicate document names’ and ‘Allow duplicat subfolder names’ should only be turned on if there are good reasons for it. From the users point of view it may even be worse if mysql and a so called case insensitve collation (e.g. utf8mb4_unicode_ci) is used. The two documents ‘Test.txt’ and ‘test.txt’ show up like that in the directory listing, but are not being distinguished when accessed. So even uploading a new file named ‘test.txt’ may update ‘Test.txt’, because searching for ‘test.txt’ could return ‘Test.txt’ instead of ‘test.txt’ as its first hit.

Resources

WebDAV defines two types of resources called documents and collections. A collection is very similar to a folder in SeedDMS. A document is similar to a document in SeedDMS, but often behaves differently from a document in a regular file system. Accessing a WebDAV document will always retrieve the latest version of that document. Older version are not visible through WebDAV.

Retrieving documents

Reading a document through WebDAV will always retrieve the latest version of a document. A document resource has the regular properties in the DAV namespace like creationdate, displayname and also has additional properties in the SeedDMS namespace. The SeedDMS namespace contains almost all document information the can be stored with the document, e.g. owner, keywords, comment, custom attributes, etc.

When accessing documents keep in mind that document names may not always be unique as already described above.

Copying and moving documents

Copy and move operations behave quite differently depending on the destination. Moving a document into a folder is identical to the operation done by the web user interface. It can be done without any information loss. Moving a document over another document should be handled with care. It takes the latest version of the source document and creates a new version in the destination document. Afterwards it removes the source document. This only moves the content of the version, but no other information like approvers, reviewers, attributes, etc. Copying a document over another document behaves equally but keeps the original document. Coying a document into a folder will only copy the latest content

Copying and moving folders

Folders can only be moved into folders. Copying a folder is currently not supported.

Deleting documents and folders

This does what one would expect. It deletes folders recursively.