WebDAV support has been removed in EditLive! 9.1
Tiny EditLive! supports the WebDAV protocol. The WebDAV protocol allows easy directory browsing of server locations. WebDAV can be used in EditLive! to enable directory browsing from a server location when adding images or hyperlinks to a document. This provides the end users of EditLive! with an interface to easily browse directories on the server. EditLive! can also be configured to allow all local images in the user's content to be uploaded to a WebDAV repository.
Through the use of EditLive!'s configuration files users can also be restricted in their access so that only specific WebDAV repositories are available to them.
This document provides information on how to use WebDAV with EditLive!. It assumes that you have a WebDAV enabled server and are able to configure your server to allow WebDAV access to specific directories.
Using WebDAV with Images in EditLive!
Using a WebDAV server with an instance of EditLive! that has been configured accordingly results in users being able to browse the relevant WebDAV repository from within the Insert Object, Insert Image and Insert Hyperlink dialogs in EditLive!. In the case of the Insert Image and Insert Object dialogs, EditLive! filters the available files on the WebDAV repository according to their MIME type. The Insert Image dialog will only include files which have the image/jpeg, image/gif or image/png MIME types while the Insert Object dialog will only include files that match the file types specified in the <multimedia> configuration file element and its children.
Configuring EditLive! for Use with WebDAV Browsing
EditLive! can be easily configured for use with WebDAV via the EditLive! configuration file. The configuration settings for the use of WebDAV with EditLive! can be found within the <webdav> configuration file element. The <webdav> element contains a listing of WebDAV repositories which have their details specified by the <repository> configuration file elements.
Basic Configuration Example
The following provides a basic example of how to configure an instance of EditLive! for use with a WebDAV repository. It involves the minimum number of settings to get WebDAV functioning correctly within EditLive!. In this example the server does not implement password protection. For the purposes of this example the WebDAV server which EditLive! is being configured for use with has the following properties:
- The WebDAV repository has the URL http://www.yourserver.com/UserFiles/WebDAV.
- The base for documents created with EditLive! (i.e. the calling of the setBaseURL Method) is http://www.yourserver.com/UserFiles/EditLiveFiles. This means that the location of the WebDAV repository relative to the EditLive! document base is ../WebDAV.
- The repository should be listed to users as the Images repository.
The EditLive! configuration file, in this case, would contain the following elements:
Setting a Default Browsing Directory
If you want the EditLive! end users to view a directory other than the root directory of the WebDAV repository by default, then the defaultDir attribute of the <repository> configuration file element should be used and assigned the relevant value. Users can still move up the directory tree to the root directory if desired.
Continuing from the example above, if the http://www.yourserver.com/UserFiles/WebDAV directory had a subdirectory images which you wished the usersto access by default then the XML configuration would be as follows:
MIME Type Filtering with WebDAV
The browsing of a WebDAV repository with EditLive! can be restricted according to the MIME of the files within the repository. As the WebDAV functionality within EditLive! is used with images then files with the following MIME types will be displayed:
In order to activate MIME type filtering within EditLive! the configuration file must contain the relevant setting. Continuing from the examples above the XML configuration for EditLive! would be as follows:
The default setting for the useMimeType attribute is true.
Password Protected WebDAV Repositories
If your WebDAV repository implements basic authentication then you can configure EditLive! to use the correct username and password information. These values are specified using the username and password attributes, respectively, of the <repository> configuration file element. If the username and password specified are incorrect, EditLive! will prompt the user for a username and password when the WebDAV server is accessed.
EditLive! for Java supports the following forms of authentication:
Continuing from the examples above, if the realm was www.yourserver.com (an NTLM realm), and if the username was webdav and the corresponding password was example, then the XML configuration for EditLive! would be as follows:
Configuring EditLive! for Uploading Images to WebDAV Repositories
EditLive! can be easily customized to upload any local images to a specified WebDAV repository. Using an EditLive! configuration file, you can nest a <repository> element within the <httpUpload> element. Note that unlike other uses of WebDAV in EditLive!, there is no browser. WebDAV image uploads can only be done to a single folder.