Binary file storage locations

Author Message

James Robertson

Wednesday 17 May 2006 3:06:43 pm

What is the difference between the various locations in which binary files are stored (in the filesystem)?

For example:
design/standard/templates/content/datatype/view/ezbinaryfile.tpl
uses an ugly looking concat() statement to build a file path like this:
http://example.com/content/download/2763/31387/version/3/file/ENUtxt.pdf

whereas
design/standard/templates/content/datatype/view/ezbinaryfile_direct.tpl
uses $attribute.content.filepath property, which contains a filepath like this:
http://example.com/var/biotech/storage/original/application/427211c95c56412fe1da1671af5f40fc.pdf

What's the difference (apart from the fact that the second example is clearer to achieve but look uglier)?

Also, Is the second example version controlled (ie. will $attribute.content.filepath always point to the latest version of the file)?

Why are the files (apparently) stored twice?

Bruce Morrison

Wednesday 17 May 2006 4:35:37 pm

Hi James

The first example is a passthrough and will utilise eZ access checking etc, ensuring that the user accesing the file has the correct permissions to view the file (based on access to the parent object).

The second example will be a direct link to the file.

The file is stored once.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

James Robertson

Thursday 18 May 2006 3:17:22 pm

Thanks Bruce. [Looking at this again, I should have been able to work this out myself. Must have been a bad day ;-]

Wouldn't it be nice to have the 'passthrough' URL available as a property of the binary_file attribute, just like the filepath (ie. 'direct link'), instead of having to create it using that horrible concat() statment (with all those naughty hard-coded partial path names). Were do I apply to make this happen?

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 19 2025 00:08:22
Script start
Timing: Jan 19 2025 00:08:22
Module start 'layout'
Timing: Jan 19 2025 00:08:22
Module start 'content'
Timing: Jan 19 2025 00:08:23
Module end 'content'
Timing: Jan 19 2025 00:08:23
Script end

Main resources:

Total runtime1.6193 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.9141152.6250
Module start 'layout' 0.00640.0035 740.539139.4453
Module start 'content' 0.00991.6081 779.9844541.3203
Module end 'content' 1.61800.0013 1,321.304712.4766
Script end 1.6193  1,333.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2109160.0002
Check MTime0.00140.0837160.0001
Mysql Total
Database connection0.00140.087110.0014
Mysqli_queries1.561696.4361570.0274
Looping result0.00060.0399550.0000
Template Total1.580397.620.7902
Template load0.00210.127220.0010
Template processing1.578397.465220.7891
Template load and register function0.00010.009110.0001
states
state_id_array0.00170.104210.0017
state_identifier_array0.00160.101120.0008
Override
Cache load0.00170.1041280.0001
Sytem overhead
Fetch class attribute can translate value0.00070.043220.0003
Fetch class attribute name0.00170.102950.0003
XML
Image XML parsing0.00230.139720.0011
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00310.1913220.0001
String conversion0.00000.000440.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 6

Time used to render debug report: 0.0001 secs