Reply to which is the better option for directory hashing to store large number of image files?

Your name:

Reply:


Posted by theCancerus on 09/17/07 07:09

Hi All,

I am not sure if this is the right place to ask this question but i am
very sure you may have faced this problem, i have already found some
post related to this but not the answer i am looking for.

My problem is that i have to upload images and store them. I am using
filesystem for that.

setup is something like this, their will be items/groups/user each can
have upto 6 images which needs to be scaled to 4 different sizes ie
every item can have upto 24 images of varying sizes.

now the standard way of storing these files would be to store them in
subdirectories based on some hash.

my partial solution is to split the four types of files into four
fixed base folders for each dimension,

since filename is in format "YmdHis" i decided to use directory
structure as Y/m/d/<filename>.
but i realize that even this could be inefficient.

so now i am thinking about going one more level by creating Y/m/d/H/i/
<filename> directory structure.

now my question is how to go about creating subdirectories below base
folders, will my scheme hold or should i use md5 hash as suggested by
others, over the filename and then take 2-3 characters and create one
or two level of directory structure and then store the files?

Regards,
Amit

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация