cancel
Showing results for 
Search instead for 
Did you mean: 

Nonescaped URL; creating an Webdav URL for Windows Explorer

robses
Champ in-the-making
Champ in-the-making
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">
<tr><td><b>Network location:</b></td><td>${webdavurl}/${space.displayPath}/${space.name}</td>

– 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
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
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.

Thanks,

Kevin

mikeh
Star Contributor
Star Contributor
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.

Mike

robses
Champ in-the-making
Champ in-the-making
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