Can you help me convert a saved image to the database (bytea, in postgresql), to image and display it on a web page (jsp)?
I convert the image this way, and save on database:
Part part = req.getPart("profilePic");
byte[] prfilePic = new byte[(int) part.getSize()];
InputStream stream = part.getInputStream();
stream.read(prfilePic);
stream.close();
But how can I convert from bytea to image again and display it?
Aucun commentaire:
Enregistrer un commentaire