Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

building an online image library with content management 1

Status
Not open for further replies.

eljacobs

Programmer
Oct 13, 2003
47
GB
Hi

i have been building fairly straight forward dynamic applications in asp vbscript and access for a while (mainly using dreamweaver mx but i'm fairly comfortable with scripting).

I'd now like to build an online photo gallery that stores low res images in a database and allows the administrator to upload new images.

Up until now i haven't done anything using images and i wondered if anyone had any tips on the best way to approach this?

For example:

are the images themselves stored in the database or do you simply store the path to the image in the database?

What is the best way to allow the user to upload an image to the database/server?

Any advice is much appreciated.

Regards

EJ
 
personally, i tend to try and avoid db's on things like photo galleries, cause if the image is gone from the filesystem, yet it's in the db and voila broken images..

i've used ASPimage for a while, from serverobjects.com costs like 60 bux...i use it to auto generate thumbs using a mirrored directory structure of the folder/file system of the tree structure where the full images reside, this can even be pushed another level to midsized images as well.

then just push a max width/height to the object on making the thumb, and when displaying the page, all you have to do is check if the the thumb exists, if it doesn't pop one off otherwise display it in the page.

nice part of this is , since it makes it if it needs to, you never have to worry about renaming the thumbnal to match the image, if the image gets deleted the thumb is ignored, and if you forget about moving a tree structure or something, the thumbs are so small you're not losing out on very much.

if you'd like to see some of the code i use for it i'd be happy to post it.



[thumbsup2]DreX
aKa - Robert
 
Thanks for your reply.

I am only using very small, lo res images anyway so i do not need to create thumb nails so that is not really a problem. The other issue is that it is someone else that will be uploading images, as well as other details such as description, ref number etc so i think a database will be necessary.

what do you think?
 
I think you will need to hold the text based information in a database, but its still best to hold the images on the filesystem. The best way whcih avoids confusion is to make the image name the same as the unique ID of the database entry (ie 1.jpg) and hold them all in the same folder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top