Displaying size of a binary file

Author Message

James Packham

Friday 11 June 2004 9:24:26 am

Hi,

I'm trying to figure out all the differences between ez publish 3.3 and 3.4 that effect my site and one of the last ones I've got is that the template variable $object.data_map.file.content.filesize not longer works. I used this in ez publish 3.3 to display the size of a binary file in bytes.

I've had a dig around in the $object tree using attribute(show) and I can't find something to tell me the size of my file anywhere.

Does anyone know either

a) where it's moved.
b) if there's a new way to display the size of a file.

Thanks,

James

Paul Borgermans

Friday 11 June 2004 10:32:27 am

James,

I did not migrate our 3.3 sites to 3.4 yet, but a vanilla 3.4 installation still uses the same structure, albeit from the $attribute variable passed to dataype view templates:

{$attribute.content.filesize|si(byte)}

You cleared accelerator caches?

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

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:00:43
Script start
Timing: Jan 18 2025 15:00:43
Module start 'layout'
Timing: Jan 18 2025 15:00:43
Module start 'content'
Timing: Jan 18 2025 15:00:44
Module end 'content'
Timing: Jan 18 2025 15:00:44
Script end

Main resources:

Total runtime0.9785 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.0703152.6250
Module start 'layout' 0.00540.0029 741.695339.4453
Module start 'content' 0.00830.9686 781.1406530.4688
Module end 'content' 0.97690.0016 1,311.60948.1563
Script end 0.9785  1,319.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3348160.0002
Check MTime0.00130.1355160.0001
Mysql Total
Database connection0.00090.096610.0009
Mysqli_queries0.924394.4583540.0171
Looping result0.00050.0541520.0000
Template Total0.948997.020.4744
Template load0.00240.248920.0012
Template processing0.946496.717920.4732
Template load and register function0.00010.009710.0001
states
state_id_array0.00070.070610.0007
state_identifier_array0.00150.152920.0007
Override
Cache load0.00200.2021190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.076220.0004
Fetch class attribute name0.00180.188840.0005
XML
Image XML parsing0.00080.086720.0004
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00080.0851230.0000
String conversion0.00000.001040.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs