This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Setup & design » Downloading file not working
expandshrink

Downloading file not working

Downloading file not working

Tuesday 03 February 2004 9:56:53 am - 1 reply

Hello,
I just want to download a file that is attached as a binary file to an article, should be really simple, but its not. I get a "object not found" when trying to get it. Ez is using the ezbinaryfile.tpl to download. The code in it is like this:

<a href={concat("content/download/",$attribute.contentobject_id,"/",$attribute.id,"/file/",$attribute.content.original_filename)|ezurl}>{$attribute.content.original_filename|wash(xhtml)}</a> {$attribute.content.filesize|si(byte)}

In my template Im just using this code for displaying the link:
{attribute_view_gui attribute=$content_version.data_map.attach1}
which gives me this request-string:
http://www.mysite.no:8090/content...1/2789/file/Content_Editor_Howto.doc
And the well-known "Object not found", the link seems correct though.

UPDATE:
I have looked at the sql by enabling sqloutput, and this is what is beeing queried from the db:
SELECT contentobject_attribute_id, version, filename, original_filename, mime_type
FROM ezbinaryfile
WHERE contentobject_attribute_id='2790' AND version='4'
Error:
Feb 05 2004 10:08:34
The specified file could not be found."

I run this query directly on the db, and get 1 row back. This contains the following:
contentobject_attribute_id version filename original_filename mime_type
2790 4 phpRmGosZ.xls Premiere-kontakter.xls application/vnd.ms-excel

I look in the file system, and the file is in this location:
/opt/ezpublish/3.2.4/var/storage/original/application/phpRmGosZ.xls
, but ezpublish can't find it.

I think ezpublish is using a wrong path to these files, if you know where it is set or have a solution to this, please let me know.

Thanks,
claus

Modified on Thursday 05 February 2004 10:40:31 am by Claus Jensen

Thursday 05 February 2004 1:14:09 pm

Ezpublish had the wrong file storage directory setting in site.ini. Now it works.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from