Image

Image_benbenben_ wrote in Imagephp

I have a Database web design question?
I want to make a place on my site for visitors to upload images.
I don’t want to use any of the pre made galleries online; I want to make my own.
I’ve thought about this for a little time and was wondering if I can get some logical input.
These are my thoughts:

1) Store images inside my Database as blobs.
2) Upload images into a directory and store the names in a Database.
3) Something I haven’t thought of. 

If I were to store blobs, my database would be huge I do want to allow unlimited number of file uploads. I know I can tweak the script to allow only safe sized images but still.
If I store the images in a directory I still have the same problem I don’t want to pre make 1000 fields in my table. So I was thinking I can have the script rebuild my table to expand for each new upload, or shrink if an image is deleted, but wouldn’t that slow the database down so much so that it would be the longest file upload in history if more then one person is uploading?
I’m sure there is a correct way of handling file uploads. Any help is appreciated.