I am trying to let user be able to upload an image file (jpeg, bmp etc) from front end.
I am using Jsp for the file input type browsing. Servlet for uploading into a table (in mysql), table - has a columnBLOB type.
It sounds pretty easy = that let user upload the pic, store it in a table and pull it out when needed.
But I am not able to get it working -
1. How to extract the contents of the file which is being uploaded to insert in the table?
2. How to be sure its an image - just the extension?
3. I can upload any image in the table I have - but HAVE to user MySql Query browser for that ... how would that work from application point of view?
4. Any jar or already existing tool that could be used if 1-3 are not possible
God, I swear I tried very hard. But am stuck... need to be pulled out of here ...