aspose file tools*
The moose likes Servlets and the fly likes Upload image in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Upload image in database" Watch "Upload image in database" New topic
Author

Upload image in database

abhijeet srivastava
Greenhorn

Joined: Aug 22, 2006
Posts: 26
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

Joined: Nov 29, 2005
Posts: 2308
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.


Rahul Bhattacharjee
LinkedIn - Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

The JSP FAQ has an entry explaining file uploading.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Upload image in database