@Bean @ConditionalOnMissingBean(MultipartConfigElement.class) public MultipartConfigElement multipartConfigElement(GraphQLProperties graphQLProperties) { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize(DEFAULT_UPLOAD_MAX_FILE_SIZE); factory.setMaxRequestSize(DEFAULT_UPLOAD_MAX_REQUEST_SIZE); String temp = graphQLProperties.getServer().getUploadMaxFileSize(); if (StringUtils.hasText(temp)) factory.setMaxFileSize(temp); temp = graphQLProperties.getServer().getUploadMaxRequestSize(); if (StringUtils.hasText(temp)) factory.setMaxRequestSize(temp); return factory.createMultipartConfig(); }
/** * Create a new {@link MultipartConfigElement} using the properties. * @return a new {@link MultipartConfigElement} configured using there properties */ public MultipartConfigElement createMultipartConfig() { MultipartConfigFactory factory = new MultipartConfigFactory(); if (StringUtils.hasText(this.fileSizeThreshold)) { factory.setFileSizeThreshold(this.fileSizeThreshold); } if (StringUtils.hasText(this.location)) { factory.setLocation(this.location); } if (StringUtils.hasText(this.maxRequestSize)) { factory.setMaxRequestSize(this.maxRequestSize); } if (StringUtils.hasText(this.maxFileSize)) { factory.setMaxFileSize(this.maxFileSize); } return factory.createMultipartConfig(); }
@Bean public MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("50MB"); //KB,MB factory.setMaxRequestSize("100MB"); return factory.createMultipartConfig(); }
@Bean MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("51200KB"); // 50MB factory.setMaxRequestSize("256000KB"); return factory.createMultipartConfig(); }
@Bean MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("50MB"); factory.setMaxRequestSize("50MB"); return factory.createMultipartConfig(); }
@Bean public MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("5120KB"); factory.setMaxRequestSize("5120KB"); return factory.createMultipartConfig(); }
@Bean public MultipartConfigElement multipartConfig() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("128KB"); factory.setMaxRequestSize("128KB"); return factory.createMultipartConfig(); }
@Bean(name = "multipartConfigElement") public MultipartConfigElement multipartConfigElement() { log.debug("New instance of " + MultipartConfigFactory.class); MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("128MB"); factory.setLocation(System.getProperty("java.io.tmpdir")); factory.setMaxRequestSize("128MB"); return factory.createMultipartConfig(); }
@Bean public MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("128MB"); factory.setMaxRequestSize("128MB"); return factory.createMultipartConfig(); }
@Bean MultipartConfigElement multipartConfigElement() { final MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("1024MB"); factory.setMaxRequestSize("1024MB"); return factory.createMultipartConfig(); }
@Bean MultipartConfigElement multipartConfigElement() { // spring-config MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize(System.getProperty("yaio.server.maxfilesize", "128kb")); factory.setMaxRequestSize(System.getProperty("yaio.server.maxrequestsize", "128kb")); MultipartConfigElement config = factory.createMultipartConfig(); // tomcat-config FileUploadBase tomcatConfig = new FileUpload(); tomcatConfig.setFileSizeMax(config.getMaxFileSize()); tomcatConfig.setSizeMax(config.getMaxFileSize()); return config; }
@Bean MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize(maxfilesize); factory.setMaxRequestSize(maxrequestsize); return factory.createMultipartConfig(); }
@Bean MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("10000KB"); factory.setMaxRequestSize("10000KB"); return factory.createMultipartConfig(); }
@Bean public MultipartConfigElement multipartConfigElement() { final MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("128MB"); factory.setMaxRequestSize("128MB"); return factory.createMultipartConfig(); }
MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("100MB"); factory.setMaxRequestSize("100MB"); return factory.createMultipartConfig(); }