| Author |
Save Image into Mysql database
|
Dev Anand
Ranch Hand
Joined: Aug 30, 2009
Posts: 40
|
|
I'm using the following code to insert image into Mysql database. It works fine in Internet Explorer. But it is not working in the remaining browsers like Mozilla n Opera, throwing file name not found exception.
How to solve this problem to work fine in all the browsers?
------------code---------------
imgUrl=request.getParameter("file_image")!=null ? request.getParameter("file_image"):"";
FileInputStream in =null;
int len=0;
try
{
in= new FileInputStream(imgUrl);
len=in.available();
}
catch(Exception e)
{
System.out.println(e);
}
pstmt.setBinaryStream(4, fis, len);
----------------------------code End--------------------------
|
 |
ujjwal soni
Ranch Hand
Joined: Mar 28, 2007
Posts: 391
|
|
|
It seems to be a problem with the jsp, can you post some code here please ?
|
Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
|
 |
 |
|
|
subject: Save Image into Mysql database
|
|
|