Friendly URL for files in Media section

Author Message

Marc-Aurèle Brothier

Thursday 29 November 2007 10:07:05 am

Hello,

I wish to change the way the URL are displayed in the page if the files comes from the media section. Normally it's something like this when you have an object relation to a file in the media section:
http://www.mysite.com/mysiteaccess/content/download/objectid/attributeid/version/version_number/file/myfile.ext

And it's really not nice if you want to give an URL to someone as a permanent URL to download something, because the version number will at least change each time you're gonna upload a new one. I know I could use the URL alias, but it's "ok" for a couple of files, but not when you have hundreds...

Does anyone have an idea how to do to have a nicer url like:
http://www.mysite.com/mysiteaccess/download/some_fixed_attribute/myfile.ext
so that the URL won't ever change when I upload a new one? (config, extension, apache conf, ...?)

Thanks

Marc-Aurèle Brothier

Wednesday 11 June 2008 5:14:26 am

Hi!

Any one having an idea how to solve this?

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 31 2025 04:35:44
Script start
Timing: Jan 31 2025 04:35:44
Module start 'layout'
Timing: Jan 31 2025 04:35:44
Module start 'content'
Timing: Jan 31 2025 04:35:44
Module end 'content'
Timing: Jan 31 2025 04:35:44
Script end

Main resources:

Total runtime0.0162 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.2500151.2266
Module start 'layout' 0.00470.0030 739.476636.6797
Module start 'content' 0.00770.0056 776.156390.0469
Module end 'content' 0.01330.0029 866.203129.9922
Script end 0.0162  896.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002314.3595140.0002
Check MTime0.00116.5436140.0001
Mysql Total
Database connection0.00074.318310.0007
Mysqli_queries0.002515.562630.0008
Looping result0.00000.104410.0000
Template Total0.00116.710.0011
Template load0.00095.305210.0009
Template processing0.00021.325210.0002
Override
Cache load0.00063.522610.0006
General
dbfile0.001810.872280.0002
String conversion0.00000.061840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs