Obtaining Image original filename full path

Author Message

Rich R

Monday 06 December 2010 9:51:46 am

Hi,

Im having trouble obtaining the full path of the original file which is uploaded in a Image object.

I can obtain the paths of each image size via $node.data_map.image.content.IMAGE_SIZE however not for the original file uploaded, I seem to only be able to obtain the name.

Any advice appreciated, thanks!

Ivo Lukac

Monday 06 December 2010 10:31:12 am

Hi Rich,

Try with image alias 'original' instead of IMAGE_SIZE

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Lo' F.

Monday 06 December 2010 10:32:18 am

...How about if you try with this?

{$node.data_map.image.content[original].full_path|ezroot()}

loredanaebook.it

Rich R

Tuesday 07 December 2010 2:42:45 am

Thank you. However what I after is the very original image that was uploaded into eZ. The filename as stored in original_filename. For example if I upload a tiff file, eZ creates a jpg of it which is stored as the "original" image size. However I am after the full location of the tiff that I uploaded.

Lo' F.

Tuesday 07 December 2010 7:29:51 am

Hi Rich.

It seems that when an image is uploaded in an image object, it is manipulated and stored in the filesystem with the name of the main object as there is no track of the file as uploaded nowhere in the folders (at least I could not find it..)

I have been searching for an attribute returning the original file path ..

{$node.data_map.image|attribute(show)}

but all I have been able to get is, like you said, the original file name..

{$node.data_map.image[content][original_filename]}

..or the original (but renamed) image file path.

p.s. sorry for the "inappropriate" above, Ivo! I hit the touch-pad by mistake..!

loredanaebook.it

Rich R

Thursday 09 December 2010 3:28:56 am

Hi Lo' F.,

Thank you for your efforts.

Indeed, there is no reference to the path of the real original in the node. I also have a feeling that eZ discards of this file as greping for original_filename in var does not always yield results.

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 29 2025 14:44:57
Script start
Timing: Jan 29 2025 14:44:57
Module start 'layout'
Timing: Jan 29 2025 14:44:57
Module start 'content'
Timing: Jan 29 2025 14:44:57
Module end 'content'
Timing: Jan 29 2025 14:44:57
Script end

Main resources:

Total runtime0.0177 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.0053 588.2656151.2266
Module start 'layout' 0.00530.0022 739.492236.6875
Module start 'content' 0.00750.0085 776.179794.2344
Module end 'content' 0.01600.0017 870.414137.9766
Script end 0.0177  908.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002212.4685140.0002
Check MTime0.00105.5958140.0001
Mysql Total
Database connection0.00105.869010.0010
Mysqli_queries0.002011.529430.0007
Looping result0.00000.119710.0000
Template Total0.00126.810.0012
Template load0.00095.157210.0009
Template processing0.00031.563410.0003
Override
Cache load0.00063.437710.0006
General
dbfile0.003419.322480.0004
String conversion0.00000.049840.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