DiskFileItemFactory factory = new DiskFileItemFactory();
factory.setSizeThreshold(0);
if(saveDir != null)
factory.setRepository(new File(saveDir));
ServletFileUpload upload = new ServletFileUpload(factory);
upload.setHeaderEncoding(CJWGlobals.getCharacterEncoding());
Log.debug("Setting max size to " + maxSize);
maxSize = CJWGlobals.getLocalProperty("blog.photo.upload.maxSize",62914560);
upload.setSizeMax(maxSize);