This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSF and the fly likes Saving image to BD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Saving image to BD" Watch "Saving image to BD" New topic

Saving image to BD

Jose Ayerdis
Ranch Hand

Joined: Sep 14, 2008
Posts: 30
i have some questions about saving images to bd :

is there a way to save images to bd??

should i uploaded to the server first??

i am using inputFile but no luck with that there is no way i can instanlly transform the file to byte and save it withoud having it uploaded....

and finally i know how does the inputFile shows but i'd like to have something else display i just want the dialog functionallity to pick the file can that be done??

[Thumbnail for autocomplete.png]

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 808

You can use BLOB - Binary Large Object in SQL.
Alternatively you can upload that image on a photo server and put a link to it into the databse.

Jose Ayerdis
Ranch Hand

Joined: Sep 14, 2008
Posts: 30
yes i can use blob you're right but i was asking a method or example to do it with JSF....

should i uploaded to the server first with inputFille??

and i want to use the inputFile dialog only in order to the user click on the image and pick one but i don't know how.....
I agree. Here's the link:
subject: Saving image to BD
jQuery in Action, 3rd edition