Forums / General / uploading and downloading files

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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 X

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

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 X

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.

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 Exponential message but internet explorer message. If I remove the '.wmv' from the link or just remove the '.' I will receive Exponential 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 X

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

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 X

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.

Rami Grossman

Sunday 01 August 2004 2:25:09 am

Thanks for your help, Björn.