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 744067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:56:08+00:00 2026-05-14T08:56:08+00:00

How do I store a photo on the server. I store them in a

  • 0

How do I store a photo on the server.

I store them in a directory – “D:\zjm_code\basic_project\pinax\media\default\pinax\images\upload” but this now a lot of images.

Is there another simple way?

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-05-14T08:56:09+00:00Added an answer on May 14, 2026 at 8:56 am

    When you store all the images in one directory it could quickly become unmanaged due to huge number of files. You can put your images in subdirectories based on md5 or sha1 hash function. Usually 2 levels of subdirs is enough.

    In this case your directory images/upload will contain subdirs with the names 00, 01, 02 .. FF (256 names total) and each of these 256 directories in turn will contain directories with names 00 through FF giving you in total 256*256 directories on level 2.

    For each uploaded file you calculate hash function (not necessary based on it’s content, but on some unique data) and take [0:2] as a name of first directory and [2:4] as a name of second level directory.

    This would be helpful in creating directories: mkdir -p functionality in Python

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

Sidebar

Related Questions

How would I save each user's 'default photo' onto a website? This same photo
I am using SQL Server 2000, Data stored in the database is Photo data
I'm about to create a user based website and will have to store photo,
Like many people I am handling uploaded user images for a website. Right now
I am trying to send a photo over http to my server. So i
i have a page where users can upload there photo that photo will be
I read here that Heroku doesn't allow you to store photos on their server
I want to start the camera and click a photo and store it in
I'm trying to upload a photo from android device to a php website. For
I don't want to store photos on the server. I'd prefer to use picasa

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.