How to save, retrieve and draw an image in webapplication using Java and PostgreSQL?
Posted
by spderosso
on Stack Overflow
See other posts from Stack Overflow
or by spderosso
Published on 2010-05-16T00:02:56Z
Indexed on
2010/05/16
0:40 UTC
Read the original article
Hit count: 309
Given an object X; I want this object to have an image. The image must be stored in the database. I can't store the path, the actual image must be in the database.
My question can be answered by answering the following subquestions:
a). What type of field should I put in the database? (e.g VARCHAR)
b) What type of object should I use for storing and manipulating the image (at an object layer)? (e.g java.awt.Image)
c) How do I create an object of the type selected (answer of question b) from the data obtained from the database?
d) How do I save an object of the type selected (answer of question b) to the database?
e) How do I draw the image on a web page?
I am using PostgreSQL, Java and it is a web application.
Thanks!
© Stack Overflow or respective owner