Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Upload image in database  RSS feed

 
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
Posts: 65824
134
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
Boost this thread!