Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upload image in database

 
abhijeet srivastava
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

How is that possible to upload image in database table by selecting image file in FileChooser.I want to upload imgage file, not its name.

Thanks.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by abhijeet srivastava:
Hi all!

How is that possible to upload image in database table by selecting image file in FileChooser.I want to upload imgage file, not its name.

Thanks.


As images are binary..you can put the binary content in BLOB filed.Upload the image to server and then use a servlet to upload its binary content to database. I do not know if this would be efficient.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSP FAQ has an entry explaining file uploading.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic