Changes

Jump to navigation Jump to search
2,037 bytes added ,  13:40, 2 July 2020
This page is part presents one of the [[Developer Section]] and belongs to the [[Web Application]] stackservices. It describes how to use the WebDAV file system interface.
BaseX offers access to the databases and documents using the [httphttps://en.wikipedia.org/wiki/Webdav WebDAV] protocol. WebDAV provides convenient means to access and edit XML documents by representing BaseX databases and documents in the form of a file system hierarchy.
By default WebDAV service The implementation in BaseX is activated and is accessible at {{Code|based on the [http://localhost:8984/webdav/}}milton.io Milton library]. Generally it can be accessed using either with a <code>http:&#47;&#47;<httphost>:<httpport>/webdav/</code> or <code>webdav://<httphost>:<httpport>/webdav/</code> URLCurrently, depending on the used WebDAV clientonly Basic Authentication is supported.
==Authorization=Usage=
The By default, the BaseX HTTP server makes the WebDAV service uses the database user credentials in order to perform authentication and authorizationaccessible at {{Code|http://localhost:8984/webdav/}}. If database user and password no default credentials are explicitly specified when starting , they will be requested by the BaseX HTTP Server using the corresponding client ([[Startup_OptionsWeb Application#BaseX_HTTP_ServerUser Management|startup optionssee further]]). It can be accessed by either <code>http:&#47;&#47;<httphost>:<httpport>/webdav/</code> or <code>webdav://<httphost>:<httpport>/webdav/</code>, depending on your WebDAV will not request additional user authentication from the client.
Please note that the file size of XML documents will be displayed as 0 bytes, as the actual file size can only be determined if the full document is being returned and serialized. This may cause problems with some WebDAV clients (e.g. NetDrive or WebDrive). =Authorization= The WebDAV service uses the database user credentials in order to perform authentication and authorization. Initial user name and password are both set to <code>admin</code>. If database user and password are explicitly specified when starting the BaseX HTTP Server using the corresponding [[Command-Line Options#BaseX_HTTP_Server|startup options]], WebDAV will not request additional user authentication from the client. =Root Directory= In the WebDAV root directory, all existing databases are listed. As new resources can only be stored inside a database, it is not possible to store files in the root directory. If a file is copied on top level, a new database will be created, which contains this resource. =Resources= ==XML Documents== Uploaded files that start with an angle bracket will be stored as XML files. XML entities will be decoded during this process. If a file is downloaded, the characters with the following code points will be encoded as entities: * 160 (non-breaking space)* 8192–8207, 8232–8239, 8287–8303 (see [https://en.wikipedia.org/wiki/General_Punctuation General Punctuation]) ==Binary Files== If XML parsing files, or if the first character of the input is no angle bracket, the file will be stored as binary resource. =Locking= The BaseX WebDAV implementation supports locking. It can be utilized with clients which support this feature (e.g. [[oXygen|oXygen Editor]]). [https://tools.ietf.org/html/rfc4918#section-6.2 EXCLUSIVE and SHARED] locks are supported, as well as [https://tools.ietf.org/html/rfc4918#section-7 WRITE] locks. '''Note:''' WebDAV locks are stored in a database called <code>~webdav</code>. If the database is deleted, it will automatically be recreated along with the next lock operations. If a resource remains locked, it can be unlocking by removing the correspondent <code><w:lockinfo></code> entry. =WebDAV Clients==
Please check out the following tutorials to get WebDAV running on different operating systems and with oXygen:
* [[WebDAV: Windows 7|Windows 7and up]]
* [[WebDAV: Windows XP|Windows XP]]
* [[WebDAV: Mac OSX|Mac OSX 10.4+]]
=Changelog=
 
;Version 7.7
* Added: [[#Locking|Locking]]
;Version 7.0
* WebDAV API introduced
 
[[Category:HTTP]]
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu