WebDAV Sample

This page demonstrates the edit-on Pro WebDAV capabilities.

Important: This sample needs to be configured in order to make the WebDAV capabilities work properly. Please follow the configuration information below and then uncomment line 81 ("eop.loadEditor") of this page in order to load the applet.

In order to insert an image, object or hyperlink from a WebDAV repository just open the according dialogs from the toolbar or menu. In the dialogs, you will find a button to open the "Browse Repository" dialog.

You can find the corresponding upload functions in the "WebDAV" menu. By hitting the "Preview" button you will be asked to upload inserted images or objects before the document is opened in a new browser window.

WebDAV configuration information:

The WebDAV functionality is configured with the "<filemanagement>" element in the config.xml file. Each insert and upload action has a corresponding file type, e.g. type="image". Thus you can specify different WebDAV repositories for different file types:

<filemanagement>
    <file type="image" baseurl="http://www.example.com/"
        onuploadfinished="WebDAVEventHandler" >
        <webdav url="http://www.example.com/"
            username="myusr"
            userpassword="mypwd"
        />  
    </file>
</filemanagement>
								            

In order to configure this sample to use your own WebDAV enabled server, please change the following attributes in the config.xml file:

  • baseurl
    Must point to the location to which inserted and uploaded files should be relative to.
  • url
    Must point to the WebDAV repository, which you want to use to insert and upload files of the corresponding file type.
  • username and password
    The username and password, that are required in order to connect to your WebDAV repository.

The code sample above only shows the configuration settings for the file type "image". In this sample's config file, there also settings for "object" and "document". Please adjust them accordingly.

Direct links:

Back to Samples Index