Direct link to download file.

Author Message

Daniel Guerrier

Tuesday 19 July 2005 11:44:10 am

Is there any way to access binary files for download with a direct link?

My current attempt redirects me to the index page.

{let site_url=ezini('SiteSettings','SiteURL') file_path=$item.data_map.file.content.filepath}
	{concat('http://', $site_url, '/', $file_path)}
{/let}

Daniel Guerrier

Tuesday 19 July 2005 12:36:24 pm

The above code returns

http://leeroy:8080/var/plain/storage/original/video/9a379be98aea17c5b5602184f27e5a55.flv

but accessing the link redirects me to the index page.
That is the correct path to the file.

I saw other forum entries about overiding the the ezbinaryfile.tpl, but it is not to clear how I can output the direct link to the file into an xml file for use by another application.

I do like this product, but it is to be very difficult to do what many percieve should be easy.

ludo thomas

Monday 22 August 2005 7:14:11 am

try this in a .tpl:

<a href=content/download/{$node.object.data_map.file.contentobject_id}/{$node.object.data_map.file.id}/file/{$node.object.data_map.file.content.original_filename }>{$node.object.data_map.file.content.original_filename|wash( xhtml )}</a>&nbsp;{$node.object.data_map.file.content.filesize|si( byte )}

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