Where to store/upload an image from a web form? In the database table or on webserver/filesystem?

Anurag

New Member
I am developing a matrimonial website where I require to store/upload images from users at the time of registration. I want to know what is the best approach to store/upload images for such a purpose, that is where to store/upload image, in the database table as BLOB data type or storing/uploading image in a separate folder/directory on web-server/file-system and and adding the location/details (text string) of the images to the database.? I am using Java, JSP, Servlets for programming and MySQL as database. Please also let me know if any other best methodology is there. I am also told that certain web hosts disallow uploading images into MySQL database. My host is GoDaddy.com.<br />
 

mishatti

New Member
i think its best to store your images on a separate folder and not in the database. I tried storing images in the database and they brought me issues!!! so i kept them in a separate folder, then created a path for images on the mysql database e.g. on the field of image there was the pathimg/jane.jpg where img was the name of the folder.
 

MikeScott

New Member
I would say store the images in a seperate folder and then simply store the url of the image in the database.

In my experience storing images in a database creates a huge database and also opens the possibilty for database errors
 
Top