Files with spaces

Author Message

John Kazakis

Monday 10 March 2008 4:22:51 am

Hello everyone,

I'm having an issue with creating a link to a pdf file that's uploaded through the editor.

I have this code

    {if $node.object.data_map.file_version.has_content}
    	<span class="links"><a href={include uri= 'design:d_templates/file_url.tpl' attribute=$node.object.data_map.file_version}>VIP Access</a></span>
    {/if}

File_url.tpl:

{* This template print the url of a file attribute *}
{* Parameters:
        $attribute
*}

{concat("content/download/",$attribute.contentobject_id,"/",$attribute.id,"/file/",$attribute.content.original_filename)|ezurl}

This works well, but when there is a file with spaces it doesn't. It shows "http://www.mywebsite.com/content/download/92121/511539/file/file%20name.pdf"

It doesn't change the spaces, and because of that I get a 404 module not found page. Is there any way for me to fix this?

Thanks.

John Kazakis

Wednesday 12 March 2008 5:40:30 am

Anyone?

I've also tried using {attribute_view_gui attribute=$node.object.data_map.file_version}

but that doesn't allow me to place it in a link and use the text that I want.

Thanks.

John Kazakis

Tuesday 18 March 2008 4:16:20 am

Nobody knows why this is happening? Anybody have any ideas at all that I can try?

Thanks again...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.