reset password
Author Message
aarora2
Posts: 15
Posted 17:39 May 22, 2013 |

Hi Dr. Sun,

 

When I try to save the bytes into database, I don't see anything in database. The field is blank. But when I try to print out that field it shows me "[B@5575b2b5". Does this means the images bytes are saving into database?

talisunep
Posts: 140
Posted 17:52 May 22, 2013 |

i got the same i think we will only know if the image can be displayed int he jsp

cysun
Posts: 2935
Posted 18:15 May 22, 2013 |

Most characters are not displayable so you can't see the value of the column (assume you are using bytea) when you do "select * from ...". You can write some code to read it from the database then write it to a file and see if it's the image you uploaded.

If you use LOB, the column should show a number, which is the OID of the large object. In psql you can use the "\lo_export" command to export the lob to a file to see if it's the uploaded image.

aarora2
Posts: 15
Posted 19:27 May 22, 2013 |

Thank you Dr. Sun. I am using bytea so I think I got my answer.