Share » Forums » Developer » Image path is far too large!!

Image path is far too large!!

Image path is far too large!!

Monday 08 June 2009 7:25:59 am - 7 replies

Author Message

Jorge estévez

Monday 08 June 2009 9:24:36 am

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

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Wednesday 10 June 2009 4:53:56 am

Hello...

I need help to solve this!

--thanks--

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

kracker (the)

The Doctor

Wednesday 10 June 2009 5:44:57 am

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>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Jorge estévez

Wednesday 10 June 2009 6:20:53 am

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...

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

kracker (the)

The Doctor

Wednesday 10 June 2009 6:40:59 am

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>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Jorge estévez

Wednesday 10 June 2009 7:07:19 am

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!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

André R.

Wednesday 10 June 2009 8:21:06 am

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/library/aa365247.aspx#maximum_path_length

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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

36 542 Users on board!

Forums menu