Click to See Complete Forum and Search --> : How to store Image in database


alidar777
05-24-2006, 06:07 PM
Hi Guys,
I have a form where user can go and enter some details and upload some pictures. when user hits the save button i need to store his information in database. I know how to retrieve user information and store it in database. How will i retrieve the picture from form in my servlet and store it in my database. I am using a jsp/ servlet and mysql database. my webserver is tomcat.
Any example will be helpful
Thanks

chazzy
05-24-2006, 07:08 PM
short answer is you don't.

many people attempt to store images in databases and the truth is you can, but the cost in performance over time is very very bad. most people store the "image" on the file system and the location of the image in the database and call it like that.