eZ Community » Forums » Developer » Image path is far too large!!
expandshrink

Image path is far too large!!

Image path is far too large!!

Monday 08 June 2009 4:25:59 pm - 8 replies

Hello,

I am building a site that deals with products, as images are inserted into ez´s site, new images versions are generates as defined in image.ini, so far so good!

The problem arises when images paths are too large to be handled by windows, as the path is made from directories within the site structure and the product name itself (in some cases quite large, both directories and product names) I end up with a huge path that cannot be handled as it should and images are not showed.

I would like to shorten the names of directories and products that end up making the image´s location.

A reasonable option is to shorten up both names until I get a shortened path.

Can anyone help me please.

Thanks

Monday 08 June 2009 6:24:36 pm

Hi again

When I mean shorten the names I am refering not the structure of directories at the site (they should have whatever the used whats), but the names used to "make up" the path where the images are stored at "Var" so at the end the path gets shortened.

Maybe I could hack some php code somewhere!

Any help?

Thanks

Wednesday 10 June 2009 1:53:56 pm

Hello...

I need help to solve this!

--thanks--

Wednesday 10 June 2009 2:44:57 pm

Well, no.

I say what you need to do is
more clearly describe in exacting detail

Why and how do you need image paths
(of all paths generated by ezpublish)
to be shorter in order for us to make
a recomendation (my thoughts).

Cause I read this thread and I still do not
understand what need is requiring shorter paths.

Are you really saying that your content tree is so large
(has so many levels of depth) that it cuts off the file
name or unique id out of the generated urls ! wow that's a big site ...

I'm certain this too is possible to achive.
Some specifics as to how to do it may
depend on where and how you want
to use the shorter urls.

It sounds like you need to change the way you handle urls in ez.

Could you not use instead the older id based url style (before nice urls existed in ez) to access files and images? ie: /content/view/full/2 - /content/download/170/1050/sample05.swf

Otherwise it would seem like you need to first devise a solution to what kind of url style would avoid this depth issue and meets with your approval. I could think of tinyurl style urls as an additional option to nice urls, some crazy ez php api class changes to support a new url style and related code to switch to this new style with an existing ez install/site.

For all the work involved I'd consider strongly using the older id based urls to standardize your uri calls to the application (links) instead of engineering an new url style into the phpcode.

Cheers,
<i>//kracker

Kingspade - Lookin Up <

Checkout this extension it's cool and offtopic related,
http://ez.no/developer/contribs/hacks/shorturl

http://ez.no/developer/contribs/applications/ez_url_jump</i>

Modified on Wednesday 10 June 2009 2:50:35 pm by // kracker

Wednesday 10 June 2009 3:20:53 pm

Thanks,

My site's structure is about 5 branches deep, directories and names of products. Every product has an image.

The directories and products sometimes have large names like:

Gamma Export / Home / SPA y Fitness / Gimnasios / Cardiovasculares / Bicicletas / FIT0050 Bicicleta Vertical profesional LifeFitness CLSC

Sometimes larger than this example...

Images belonging to product "FIT0050 Bicicleta Vertical profesional LifeFitness CLSC" are generated (all definitions from image.ini) at the var directory by creating directories within directories:

(Home / SPA y Fitness / Gimnasios / Cardiovasculares / Bicicletas / FIT0050 Bicicleta Vertical profesional LifeFitness CLSC)

and at the end all variations of the images belonging to the product.

So the path grows really big (not due to the tree structure of the site but to the names asigned to folders and products) and ezpublish does not show them at all delaying the loading of the page.

I need to have a shortened version of the path generated at var for images, maybe old conventions of URL could solve this (as you mentioned in your post), if this is so how can I change to older url lke: /content/download/170/1050/sample05.swf

thanks again

Sorry if I did not make myself clear in my explanation. Hope this more clear.

thanks again...

Wednesday 10 June 2009 3:40:59 pm

No Worries,

I did a quick search of the default design templates and found this example.

{concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl}

This is the format I would use / replace your existing template links to the content objects. Obviously you will have to replace the variables above with your actual object id / attribute_id and original file name.

Cheers,
<i>//kracker

Saint Dog : Oompa Loompa</i>

Wednesday 10 June 2009 4:07:19 pm

My issue is not only a donwload problem...

I have changed from TransformationGroup=urlalias_iri to TransformationGroup=urlalias_compat

This should change long URL strings at the site to shortened ones

I am hoping that once I run php bin/php/updateniceurls.php all url's change to the shorter version as
/content/view/full/2 and (I think this could change also my problem with images variations var directory to shortened path's)

working right now

Ill get back tou you...

thanks again!

Wednesday 10 June 2009 5:21:06 pm

kracker: this is path limitation problem on Windows, so content download won't help as the image still need to be stored in the directory structure.

http://subversion.tigris.org/faq.html#long-paths
http://msdn.microsoft.com/en-us/l...ry/aa365247.aspx#maximum_path_length

Modified on Wednesday 10 June 2009 5:48:12 pm by André R

Tuesday 27 January 2015 9:54:24 am

Download Long Path Tool for easy fix.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from