Sign in to follow this  

[web] Image Management

This topic is 4839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking for ideas on how to handle managing a database of images for a website. Basically, users will be able to post pictures in multiple formats for a variety of reasons. I assume I will assign an id to each image and probably rename the file to that id. For increased speed, I've heard the best thing to do is store the files in multiple directories in the filesystem, such as directories 1-9 and sort the files into their directories based on id. Then in the database I would store the id, timestamp, user that submitted the pic, id of what part of the site it belongs to, and maybe a text description. I feel like I'm on the right track, but I'd like to hear from anyone who has done something like this before or anyone else that has some ideas. Thanks.

Share this post


Link to post
Share on other sites
I did something similar to a CMS site I designed for a client. It sounds as if you're on the right track. The system I designed assigned an ID to the file (based on time/date of the file uploaded) and copied it into a folder based on the location on the site. So if the image belonged in "articles" it was put into a folder to reflect this. The database held the original filename of the file which was then reinstated should the user want to download the image. It worked pretty well for me.

Share this post


Link to post
Share on other sites

This topic is 4839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this