SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    a general question about image uploading

    the websites which have alot of user uploaded pictures, usually dont put the pictures in one folder. they make different folders , for example for thumbs,
    example.com/thumbs02/00/15/11/30/examplethumb424234252.jpg
    I want to know what is purpose of creating so many folders? is there any recommended number of images in one folder?
    also, i assume in above example, i assume these kind of websites a new folder is created automatically after X number of images has been uploaded, in that case, can someone help me to write the code that a new folder is created after x number of images..
    thank you very much all of you.

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Putting uploaded images into different folders like a date layout (year/month/day/) makes it easier to organize and sort. Or by username of the one who uploaded to make it even easier to remove there stuff for wrong doing.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, URL like this /thumbs02/00/15/11/30/examplethumb424234252.jpg doesn't really mean that the server has the same directory structure in it's file system. It could well be (and this is very much likely) that the above URL was only rewritten (mod_rewrite, may be). The image physically could all be in a single folder.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •