uploading and downloading files

Author Message

Rami Grossman

Tuesday 27 July 2004 4:10:14 am

it is very strange the url I get of uploaded files:
"/mysiteaccess/content/download/928/5594/myfile.wmv"

when I click on such a link which was created this way:
{attribute_view_gui attribute=$node.object.data_map.file} (which looks ok)

I recieve nothing.

I found the file on the filesystem and it got some automatic name diferent from the one the template code generated (like shown above)
/var/mysiteaccess/storage/original/video/phpFFUslr.WMV
does abybody know what could it be?
I am using the media datatype.

thanks a lot

Björn Dieding@xrow.de

Tuesday 27 July 2004 5:53:02 am

please turn on debugging...

Note:
the url
/mysiteaccess/content/download/[contentobjectid]/[attributeid]/myfile.wmv

will/should deliver the file

/var/mysiteaccess/storage/original/video/phpFFUslr.WMV

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Rami Grossman

Tuesday 27 July 2004 7:38:49 am

It realy does not work
if I change the settings in file.ini from
Handler=ezfilepasstrough
to
Handler=ezfiledirect
than it works and I receive the real path of the file name

Björn Dieding@xrow.de

Tuesday 27 July 2004 7:59:56 am

Please turn on debugging/sql output and check all log files eZ('var/log'), Apache acces and error

There should be an error documented some where.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Rami Grossman

Tuesday 27 July 2004 7:16:01 pm

I figured out why I have this problem, but I don't know what todo :(
The source of the problem is the structure of the url.
"/mysiteaccess/content/download/928/5594/myfile.wmv"
if I have '.wmv' in the end of the link I receive 'page could not be found' message. Its not even eZ publish message but internet explorer message. If I remove the '.wmv' from the link or just remove the '.' I will receive eZ publish error page. So I understand that it is something with the apache configuration.

Does anyone know what should I do???

I have the same problem with the eZ 3.4 when I try to edit ini setting from the admin pannel. the url also consists '.ini' in the end.

Björn Dieding@xrow.de

Tuesday 27 July 2004 7:37:53 pm

Please check your rewrite rules...

a request to a .wma should resolve in a rewrite to index.php

and not in a e.g. 404

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Rami Grossman

Thursday 29 July 2004 7:16:29 pm

The Rewrite rule that eZ supply doesn't work.
I have changed it to make it work:

RewriteRule index.php - [L]
RewriteRule ^$ index.php [L]
RewriteRule ^/$ index.php [L]
RewriteRule !\.(wmv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php [L]
RewriteRule ^([^.]+)?$ index.php/$1 [L]
RewriteRule ^(.+)/download/(.+)\.(doc|ini|wmv|gif|jpe?g|png|css|js|html)$ index.php/$1/download/$2.$3 [L]

please reply if you have any comments about this rule.

Björn Dieding@xrow.de

Friday 30 July 2004 2:35:16 am

if it works now it is fine

thought the rules seems too complicated. I bet you can set them up easier.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Rami Grossman

Sunday 01 August 2004 2:25:09 am

Thanks for your help, Björn.

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 22:38:19
Script start
Timing: Jan 18 2025 22:38:19
Module start 'layout'
Timing: Jan 18 2025 22:38:19
Module start 'content'
Timing: Jan 18 2025 22:38:20
Module end 'content'
Timing: Jan 18 2025 22:38:20
Script end

Main resources:

Total runtime0.7112 sec
Peak memory usage4,096.0000 KB
Database Queries75

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0234152.6250
Module start 'layout' 0.00550.0035 741.648439.4453
Module start 'content' 0.00900.7008 781.0938608.4844
Module end 'content' 0.70980.0014 1,389.578120.1641
Script end 0.7111  1,409.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4303160.0002
Check MTime0.00130.1810160.0001
Mysql Total
Database connection0.00080.119410.0008
Mysqli_queries0.641090.1348750.0085
Looping result0.00080.1082730.0000
Template Total0.677995.320.3389
Template load0.00180.246220.0009
Template processing0.676195.067720.3380
Template load and register function0.00020.033610.0002
states
state_id_array0.00100.134010.0010
state_identifier_array0.00100.140020.0005
Override
Cache load0.00150.2171600.0000
Sytem overhead
Fetch class attribute can translate value0.00060.082020.0003
Fetch class attribute name0.00140.1903100.0001
XML
Image XML parsing0.00060.086820.0003
class_abstraction
Instantiating content class attribute0.00000.0047130.0000
General
dbfile0.00080.1064160.0000
String conversion0.00000.001440.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
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs