Share » Learn » eZ Publish » eZ Publish Knowledge Series: WebDAV...

eZ Publish Knowledge Series: WebDAV support in eZ Publish 4.1 now using eZ Components

Tuesday 14 April 2009 1:40:00 am

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Using WebDAV

The webdav feature in eZ Publish allows to manipulate your content base pretty much like your local files. Adding, moving, deleting, renaming content is possible. Uploaded files are transformed to the appropriate content object, based on their Mime type. This mapping between Mime types and content classes is configurable in upload.ini, as follows :

[CreateSettings]
# Maps from a mime-type or mime-group to a class identifier
MimeClassMap[]
MimeClassMap[image]=image
MimeClassMap[video/quicktime]=quicktime
MimeClassMap[video/x-msvideo]=windows_media
MimeClassMap[video/vnd.rn-realvideo]=real_video
MimeClassMap[application/vnd.rn-realmedia]=real_video
MimeClassMap[application/x-shockwave-flash]=flash

Further settings are available to customise the way files are imported in the content base, and more, you can define your own import handler, as it is done in the OpenOffice extension ( http://svn.ez.no/svn/extensions/ezodf/) for importing Open Office and MS Word documents. Have a closer look at the upload.ini file for details on how to make this happen.

Example : drag and dropping pictures online

Take the simple use-case where you come back from a wonderful event, and want to share the pictures you took there with your friends and blog readers. You would open your webDAV client ( using Transmit under Mac in this use-case ), and connect to eZ Publish :

You are then proposed the list of available siteaccesses. Pick the relevant one, and choose the subtree you want to push your pictures in. You can choose between 'Content' and 'Media'. In our case we navigate to Content, where we create a folder which will receive our gallery.

Note that when you create a folder with spaces (or other "special" characters in the name), the file names you see in the DAV client basically are the url aliases. This means these names will be converted by the same rules as other url transformation. So if you create a folder named "eZ Community Event" it might show up as that in your client (varies with different clients), however if you refresh, it will be shown as "eZ-Community-Event", and this is the correct name, to be used.
And we then upload the pictures :

And there we are, all set with our picture gallery, built in a few drag and drops :

36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)