Hi,Fabien MultipartRequest works very fine. You may use file stream wrongly. My coding is as follows. I make it in any file because of byte input-output. MultipartRequest multi=new MultipartRequest(req,"."); Enumeration params=multi.getParameterNames(); Enumeration files=multi.getFileNames(); File f=null; String f_name=null; while(files.hasMoreElements()){ f_name=(String)files.nextElement(); f_name=f_name.trim(); st_type=multi.getContentType(f_name); f=multi.getFile(f_name); } if(f!=null){ FileInputStream fis=new FileInputStream(f); FileOutputStream fos=new FileOutputStream(fname); int b; while((b=fis.read())!=-1){ fos.write((byte)b); } fis.close();fos.close(); } Fabien Modoux wrote: > Hello, > > I am using Tomcat with Apache on Linux. I am using the OReilly > package to upload files through a servlet, but it only works > for text files. I found several messages in the archive about > that, but haven't been able to find a good solution. Does > anyone know how to go around or fix this problem. > > Thanks, > > -Fabien

Reply via email to