Downloading file not working

Author Message

Claus Jensen

Tuesday 03 February 2004 12:56:53 am

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/download/491/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

Claus Jensen

Thursday 05 February 2004 4:14:09 am

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

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

eZ debug

Timing: Jan 18 2025 15:51:23
Script start
Timing: Jan 18 2025 15:51:23
Module start 'layout'
Timing: Jan 18 2025 15:51:23
Module start 'content'
Timing: Jan 18 2025 15:51:24
Module end 'content'
Timing: Jan 18 2025 15:51:24
Script end

Main resources:

Total runtime0.6381 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.3438152.6250
Module start 'layout' 0.00700.0025 741.968839.4453
Module start 'content' 0.00950.6271 781.4141432.1328
Module end 'content' 0.63670.0014 1,213.54698.4766
Script end 0.6381  1,222.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5629160.0002
Check MTime0.00130.1996160.0001
Mysql Total
Database connection0.00110.165010.0011
Mysqli_queries0.594993.2312520.0114
Looping result0.00050.0749500.0000
Template Total0.608895.420.3044
Template load0.00230.354520.0011
Template processing0.606695.059820.3033
Template load and register function0.00030.050810.0003
states
state_id_array0.00110.169310.0011
state_identifier_array0.00160.258620.0008
Override
Cache load0.00190.2933300.0001
Sytem overhead
Fetch class attribute can translate value0.00070.105810.0007
Fetch class attribute name0.00120.182620.0006
XML
Image XML parsing0.00010.017510.0001
class_abstraction
Instantiating content class attribute0.00000.001320.0000
General
dbfile0.00070.1036100.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs