Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8686169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:46:39+00:00 2026-06-12T22:46:39+00:00

I am working on a web application and i need to store images on

  • 0

I am working on a web application and i need to store images on server (these uploaded by user). i am generating new Guid for every new image.And i am creating three images of one image i.e. Original,icon and Thumb. still i am using three different folders to save these.My Project manager ask me why i haven’t create different folders for every users.
So my question is which is better way to store images between the following:

1). Upload images in only three folders i.e. Original, Icon and Thumb,
or
2). create folder for every user and then create three folders in it for original,thumb and icon.
one thing i would like to ask if the number of users will more than 100000 then will it effects performance???

which is better approach. please help me to take decision. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:46:40+00:00Added an answer on June 12, 2026 at 10:46 pm

    I’d store images by user. However, given that you potentially have a lot of users, it may not be that simple.

    User file uploads are just that: user-specific file uploads. When you manage these files you often need to apply various procedures per-user. For example: 1) remove user account and delete all related files, 2) calculate amount of space a user uses, 3) list all files a user has uploaded, etc.

    If you scatter these files across various directories it is much harder to efficiently implement the above procedures.

    You specified that you may have more than 100.000 users. Depending on what your filesystem is, you may end up having troubles because of this. For instance in ext3, there is maximum of 32K subdirectories per directory, which can be a problem for organizing the files in directories per user (see: How many files can I put in a directory?).

    Assuming that we cannot store more than 32K files or directories inside a directory then you would need to find out a way to work around this limit. For instance, you can split user folders into several subdirectories according to the first letter in username (and add an extra subdir for all the other starting characters):

    users
       a
          aaron
             ...
       b       
          bertie
             ...
       ...
       misc
          _foobar 
             ...
          @jack
             ...
    

    Now you only have roughly 100000/25=4000 users per directory, which is under the given 32K.

    Thinking outside of the box, it may not be the right choice to store the images as files in a flat filesystem. There are database systems that are specifically created for storing and handling large numbers of files. Take MongoDB’s GridFS for instance. It is very efficient and scales to large number of files, also taking care of all the lower-level issues like correct filesystem usage. In MS SQL there is the FILESTREAM Storage, which is specifically good at storing files on an NTFS filesystem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Every time I start working on a new J2EE web application, I need to
I'm working on a web application where the user provides parameters, and these are
I am working on a web based application that will need to store usernames
SUMMARY I need to store both uploaded and server-generated images, with portable and predictable
I'm working on a web application and need some help with a query. I'm
We've been working on web application where in we need to implement traditional web-apps
Hi i am working on web service application in android.i need a class that
I am working on a project where I need to embed a web server
I am working on building a web-application using Django. Since I'm new to working
I'm just working on a web application with sencha touch. I need to implement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.