Hello,
am using org.apache.commons.fileupload to upload .
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
GWT.log("is multipart? " + Boolean.toString(isMultipart), null);
ServletFileUpload upload = new ServletFileUpload();
try{
FileItemIterator iter = upload.getItemIterator(request);
while (iter.hasNext()) {
FileItemStream item = iter.next();
String name = item.getFieldName();
InputStream stream = item.openStream() ;
/**
* Save th uploaded file
*/
}
}
catch(Exception e){
e.printStackTrace();
}
}
How can i save the uploaded file ?
Thanks in Advance