Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Ibthaj Mansour   on Jul 30 In Java Category.

  
Question Answered By: Boyce Fischer   on Jul 30

it is simple  code but it works.
tt is path file that you should get from form.
in FileOutput write the path that you want to save  image.

if (tt !=null && tt.length()>1){
InputStream ff = new FileInputStream(tt);
int size = ff.available();
byte[] bb = new byte[size];
ff.read(bb);
OutputStream fo = new FileOutputStream("C:/Documents and Settings/Shahab/jbproject/datting/WebModule1/images/"+uid+username+".jpg"); fo.write(bb);
}

Share: 

 
 
Didn't find what you were looking for? Find more on image upload in JSP Or get search suggestion and latest updates.


Tagged: