Nonescaped URL; creating an Webdav URL for Windows Explorer

You are here

4 posts / 0 new
Last post
Nonescaped URL; creating an Webdav URL for Windows Explorer

Hello all,

I want my users to be able to connect to a space over webdav by using the Network places in Windows Explorer

When i use "View in WebDAV" url from the Alfresco webclient on a space with has whitespaces in the name i get an escaped
url i.e. http://alfreco.example.com/alfresco/webdav/Test/I70001%20Test%20Project

If i enter this escaped url a Network Location in the Explorer the escaped section is skipped and the following Network
location is added: http://alfreco.example.com/alfresco/webdav/Test/

This is a known bug in Explorer, see http://greenbytes.de/tech/webdav/webfolder-client-list.html#issue-connect-parent-coll-with-blanks

If i manually remove the escaped sections in the url then it is correctly added as a Network Location in the Explorer.
Is there a possibility to create a unescaped link or string of a space in Alfresco. I tried using a FTL template to recreate
the webdav url

-- snip --

<#assign webdavurl="http://alfreco.example.com/alfresco/webdav">
Network location:${webdavurl}/${space.displayPath}/${space.name}

-- snip --

but this gives me the following url:

http://alfreco.example.com/alfresco/webdav/Company Home/Test/I70001 Test Project

"Company Home" gets inserted in the url by ${space.displayPath}, when looking at the Webdav url, "Company Home" is not part
of the url. Is there a way to get a unescaped url or the path of the space without the "Company Home" part?

Regards Rob

You could use a simple substring operation to remove the "/Company Home" part of the displaypath. FreeMarker has a substring and you can also use array access to the elements in a string.



UI Team Manager and Technical Lead
http://twitter.com/kevinroast - Find me on Twitter!
http://wiki.alfresco.com - Alfresco Wiki docs and Community downloads
http://www.kevs3d.co.uk/dev - My personal HTML5 projects

Just to add to Kevin's comment:

If doing string substitution on the displaypath, ensure you use companyhome.name rather than hard-coding "Company Home" in your Freemarker script.


Thanks you for the pointer in using the substring method, feeling myself a bit ashamed i didn't think of this. When finished I will post the Freemarker template in this thread.

regards Rob

forums index