Hi am using apache commons upload for uploading files
File file=this.getFile();//getter method for the file
String fileName="test.zip";
File target=new File("D:\\test",target);
FileUtils.copyFile(file,target);
But with this i can upload only upto 20MB.how can i set the size for the uploaded files in this code.
This is in the documentation. All you have to do is call:
The above is from sample code available via the link. However, I don’t know of a
FileUtilsclass within Apache Commons Upload, and I suspect you may actually be talking about a different library.. There is a class called FileUtils in Commons IO which looks like it relates to your code sample a little better, were you by any chance talking about Commons IO and copying a file, rather than uploading one?